a python hiera parser
Project description
Piera
Piera is a lightweight, pure-Python Hiera parser. It was built to help bridge the gap between Puppet/Hiera and Python system scripts. Piera is currently not feature complete, lacking some less-used interoplation and loading features (feel free to contribute!)
Why?
Piera was built at Braintree to help us bridge a gap of emerging Python system scripts, and a historical storage of Puppet/Hiera data.
Install It
PyPi
pip install piera
Manual
git clone git@github.com:b1naryth1ef/piera.git
cd piera
python setup.py install
Usage
import piera
h = piera.Hiera("my_hiera.yaml")
# You can use piera to simply interact with your structured Hiera data
# key: 'value'
assert h.get("key") == "value"
# key_alias: '%{alias('key')}'
assert h.get("key_alias") == "value"
# key_hiera: 'OHAI %{hiera('key_alias')}'
assert h.get("key_hiera") == "OHAI value"
# Give piera context
assert h.get("my_context_based_key", name='test01', environment='qa') == "context is great!"
Requirements
- Python 2.7+
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file piera-1.2.0.tar.gz.
File metadata
- Download URL: piera-1.2.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93d64100dc0a239651bdb77b785a4e3b324869151e91ef28714f986a17e2d5ae
|
|
| MD5 |
f1d27148606a2d9a9cf04fed6f611350
|
|
| BLAKE2b-256 |
8a9e9c94638021638135741f02f2b2145eac2b8a6d45482d9e551f475222d974
|
File details
Details for the file piera-1.2.0-py3-none-any.whl.
File metadata
- Download URL: piera-1.2.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b53e7a0763eefaeb62250213ef43c38194f9c350748acb32579e04aac6128312
|
|
| MD5 |
96411e6b786b44be00394d08692de237
|
|
| BLAKE2b-256 |
2c29bb05dea3120f5823d24f48bc3428405b169c2d9c72ae575a54409b9d5e70
|