File: README.rst

package info (click to toggle)
hiera-py 0.0.1%2B20190629-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 196 kB
  • sloc: python: 312; makefile: 133; sh: 22
file content (66 lines) | stat: -rw-r--r-- 1,336 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
hiera-py
========
Python interface for the hiera hierarchical database.

.. image:: https://travis-ci.org/thomasvandoren/hiera-py.png?branch=master
    :target: https://travis-ci.org/thomasvandoren/hiera-py

See the `documentation on puppetlabs.com
<http://docs.puppetlabs.com/hiera/latest/>`_ for more detail.

Installation
------------

.. code-block:: bash

    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

Supported python versions
~~~~~~~~~~~~~~~~~~~~~~~~~

* 2.7
* PyPy

Eventually, I would like to support 3.x and 2.6+.

Getting Started
---------------

.. code-block:: pycon

    >>> import hiera
    >>> 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. ...

License
-------
BSD

Authors
-------
Thomas Van Doren

Testing
-------

.. code-block:: bash

    # 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