Skip to main content

Phiera

codecov Test PyPi Release License Python Versions Python Wheel

Phiera is a fork of Piera, a lightweight, pure-Python Hiera parser. Piera was originally built to provide Python tooling access to Puppet/Hiera configurations. The original Piera is currently not feature complete; lacking some less-used interpolation and loading features.

Table of content

Why?:

Piera/Phiera generalizes Puppet Hiera's hierarchical storage system; making a simple, very flexible, abstracted, and DRY mechanism for managing complex configuration data available to a broad set of tooling and applicable to a broad set of problems.

Phiera builds on the original Piera work, adding:

  • Python3 compatibility
  • Support for deep merging
  • Support for configuration as a dict

Installation:

From PyPi:

pip install phiera

From GitHub:

pip install git+https://github.com/Nike-Inc/phiera#egg=phiera

Manually

git clone git@github.com/Nike-Inc/phiera.git
cd phiera
poetry install

Usage:

import phiera

h = phiera.Hiera("my_hiera.yaml")

# You can use phiera 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 phiera context
assert h.get("my_context_based_key", name='test01', environment='qa') == "context is great!"

Unit Tests:

poetry run pytest --cov-report=html --cov=phiera --cov-fail-under=80 tests/

Metadata

Release files for phiera 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phiera 2.1.0
File Size Uploaded Provenance Actions
phiera-2.1.0.tar.gz 10.3 kB Without provenance Details for phiera-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for phiera 2.1.0
File Interpreter ABI Platform Actions
phiera-2.1.0-py3-none-any.whl Python 3 none any Details for phiera-2.1.0-py3-none-any.whl

Total release size: 22.0 kB

Release files / phiera-2.1.0.tar.gz

Download URL phiera-2.1.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1e6f5ae856cf1af6afddd7bb01c8184afb43bc873b4310f71360aec8e576b810
BLAKE2b-256 checksum
How to use checksums
c5aa61d169cb110946daf482564540ef361cbb43d80f9af2d1895e58ec36ac3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.1 CPython/3.10.11 Linux/5.15.0-1037-azure

Release files / phiera-2.1.0-py3-none-any.whl

Download URL phiera-2.1.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3136984461704b6f865c91e7b5ac97411e556f5ebbb50bd82af07c439278a8c2
BLAKE2b-256 checksum
How to use checksums
497301185e5ea8e8154454dd0d1df9daeb03d35e8e625f0c31c344bd3ffeeda5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.1 CPython/3.10.11 Linux/5.15.0-1037-azure

Security for phiera 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page