Python interface for the hiera hierarchical database. Forked from https://github.com/thomasvandoren/hiera-py to fix issues that are specific to my needs.
See the documentation on puppetlabs.com for more detail.
pip install git+git://github.com/sharkannon/hiera-py
- 2.7
- PyPy
Eventually, I would like to support 3.x and 2.6+.
>>> import hiera
>>> hiera_client = hiera.HieraClient('/etc/hiera.yml', hiera_vars={'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
Stephen Herd (Forked from Thomas Van Doren)
# 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