skillfed

hierarchical-conf

A tool for loading settings from files hierarchically

hierarchical-conf v1.0.4 301.7K downloads/30d#7,832 on PyPI4
License unclear AGING released

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-conf

uv

uv add hierarchical-conf

poetry

poetry add hierarchical-conf

Installing 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

Natural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

environment-based configuration loadinghierarchical yaml config managementenvironment-specific settings filesconfiguration by environment variableyaml config precedence and override
configuration-managementenvironment-aware

More Software Development packages