config
A hierarchical, easy-to-use, powerful configuration module for Python
What it is and what it does
Config is a Python configuration module that lets you define settings hierarchically in a structured format, with support for nested mappings and sequences. It handles cross-references between configuration values, allows you to reference Python objects without full-blown eval(), and supports includes so you can split configuration across multiple files. You can also merge configurations, cascade settings, and bind them to environment variables or command-line options.
The package is marked as production-stable but has not been maintained since 2021. It has no external runtime dependencies, making it lightweight to install, but the lack of recent updates means it may not work reliably with newer Python versions or address any discovered issues.
Use it for:
- Loading application settings from a config file with environment variable overrides for different deployment environments
- Building a multi-level configuration system where development, staging, and production settings inherit from a base configuration
- Parsing structured configuration files that include references to other parts of the config or external Python objects
- Integrating command-line arguments and environment variables into a unified configuration object for a CLI tool
- Creating reusable configuration templates that can be included and merged across multiple projects
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides hierarchical configuration management with support for mappings, sequences, cross-references, environment variable integration, and simple expression evaluation.
Yes, if you need hierarchical configuration and can accept an unmaintained package. The module is stable, has no dependencies, and works for straightforward config-file use cases. However, do not use it if you require active maintenance, support for recent Python versions, or security updates. Consider alternatives for new projects.
Install
config on PyPI
pip
pip install configuv
uv add configpoetry
poetry add configInstalling config
Before you install
Installation is straightforward with no runtime dependencies, but the package has been abandoned since 2021 (1798 days without release). No active maintenance or security updates should be expected.
License in practice
Licensed under BSD (permissive), allowing commercial and private use with minimal restrictions. The copyright is held by Vinay Sajip, 2004-2020.
Quickstart
pip install config
import config
cfg = config.Config('myconfig.cfg')
value = cfg.some_key
Verify before relying
- Whether the package works reliably with Python versions beyond 3.7, given classifiers list only up to 3.7
- Current state of the upstream documentation at http://docs.red-dove.com/cfg/python.html and whether it remains accessible
- Whether there are known incompatibilities or edge cases with modern Python that the abandoned status might mask
Package facts
| License | Copyright (C) 2004-2020 by Vinay Sajip. All Rights Reserved. See LICENSE for license. (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,798 days since the last release |
| First released | |
| Downloads | 1,205,223/month — #4,226 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: config-0.5.1-py2.py3-none-any.whl
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
attrdictProvides dictionary-like objects that allow…
permissive · top 5,000 on PyPI
omegaconfOmegaConf provides a hierarchical configuration…
permissive · top 1,000 on PyPI
hierarchical-confLoads configuration from YAML files organized…
unclear · top 15,000 on PyPI
cabinaCabina provides class-based configuration…
permissive · top 15,000 on PyPI
django-cteAdds Common Table Expressions (CTE) support to…
permissive · top 5,000 on PyPI
ZConfigZConfig is a schema-driven configuration…
unclear · top 15,000 on PyPI
configuratorBuilds a configuration store by layering…
permissive · top 15,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
cucumber-expressionsCucumber Expressions provides a simpler, more…
permissive · top 5,000 on PyPI