hiera分层数据库的python接口。
hiera-p的Python项目详细描述
hiera分层数据库的python接口。
有关详细信息,请参见documentation on puppetlabs.com。
安装
pip install hiera-py # Or, if you prefer easy_install: easy_install hiera-py # Or, if you prefer to install from source: python setup.py install
支持的python版本
- 2.7
- 皮比
最后,我想支持3.x和2.6+。
开始
>>> importhiera>>> hiera_client=hiera.HieraClient('/etc/hiera.yml',environment='dev')>>> hiera_client.get('my_key')'my_value' >>> hiera_client.get('nonexistent_key')Traceback (most recent call last): ...hiera.exc.HieraError: Failed to retrieve key nonexistent_key. ...
许可证
bsd
测试
# Run the tests against python 2.7. tox # Run the tests against python 2.7 with code coverage. tox -e cover # Run the tests against a bunch of python versions. tox -e py25,py26,py27,py31,py32,py33,pypy