hierarchical-conf
A tool for loading settings from files hierarchically
What it is and what it does
Hierarchical Conf is a Python library that loads application settings from YAML files organized by deployment environment. It reads an ENVIRONMENT system variable to determine which configuration file to load, then merges settings from multiple files in precedence order, with later files overwriting earlier keys. This is useful when you need different settings for development, staging, and production without hardcoding them or managing multiple branches.
The library depends only on PyYAML and supports Python 3.7 and later. You pass it a list of paths to search for configuration files, and it automatically discovers and loads files matching the pattern `{environment}_conf.yml`. It's designed for teams that want configuration-as-code with environment-aware defaults, allowing you to keep all settings in version control while still varying behavior across deployment stages.
Use it for:
- Load different database URLs, API keys, and feature flags for dev, staging, and production from a single codebase.
- Organize application settings in YAML files that override each other in a predictable order based on the current environment.
- Avoid hardcoding credentials or environment-specific values in Python code while keeping configuration files in the repository.
- Manage settings for multiple microservices that share common defaults but need environment-specific overrides.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Loads configuration from YAML files organized by environment, automatically selecting the right file based on an ENVIRONMENT variable and merging settings hierarchically.
Yes, if you need environment-aware configuration management and are comfortable with the maintenance lag. The library is simple, has no known vulnerabilities, and low install friction. However, verify the license metadata before using in proprietary projects, and be aware that the last release was nearly a year ago—check whether the project's pace matches your support expectations.
Install
hierarchical-conf on PyPI
pip
pip install hierarchical-confuv
uv add hierarchical-confpoetry
poetry add hierarchical-confInstalling hierarchical-conf
Before you install
Low friction install with a single runtime dependency (PyYAML). Last release was 359 days ago and the repository is not archived, though maintenance appears to have slowed.
License in practice
License treatment is unclear—the fact sheet does not specify a license identifier, though the description mentions Apache License 2.0 in the repository. Verify the actual license before use in proprietary or restricted contexts.
Quickstart
pip install hierarchical-conf
from hierarchical_conf.hierarchical_conf import HierarchicalConf
hconf = HierarchicalConf(searched_paths=['/path/to/configs'])
my_setting = hconf.get_config('my_key')
Requires ENVIRONMENT environment variable to be set; package expects YAML files named with environment prefixes (e.g., dev_conf.yml, production_conf.yml).
Verify before relying
- Whether license metadata is correctly registered on PyPI despite Apache 2.0 being stated in the repository.
- Current maintenance cadence and whether the 359-day gap since last release reflects active or dormant status.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (<4,>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — PyYAML |
| Maintenance | aging — 359 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 301,728/month — #7,832 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: hierarchical_conf-1.0.4-py2.py3-none-any.whl
Keywords: hierarchical-conf, configuration by environment, configuration files, configuration as code, hierarchical configuration
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
HiYaPyCoLoads and merges multiple YAML configuration…
copyleft · top 15,000 on PyPI
omegaconfOmegaConf provides a hierarchical configuration…
permissive · top 1,000 on PyPI
pyaml-envParses YAML configuration files and resolves…
permissive · top 15,000 on PyPI
configProvides hierarchical configuration management…
permissive · top 5,000 on PyPI
pyhoconParses HOCON (Human-Optimized Config Object…
permissive · top 5,000 on PyPI
application-propertiesLoads and retrieves application configuration…
permissive · top 5,000 on PyPI
PyStaticConfigurationLoads, validates, and reads configuration from…
permissive · top 15,000 on PyPI
config-parserMerges configuration from YAML/JSON files,…
agpl · top 5,000 on PyPI
cabinaCabina provides class-based configuration…
permissive · top 15,000 on PyPI
donfigDonfig provides a unified configuration system…
permissive · top 5,000 on PyPI