typed-config
Typed, extensible, dependency free configuration reader for Python projects for multiple config sources and working well in IDEs for great autocomplete performance.
What it is and what it does
typed-config is a configuration reader that maps environment variables and INI files into typed Python classes, enabling IDE autocomplete and type checking on config values. You define your configuration schema as decorated classes with typed keys, then add one or more config sources (environment, INI file, etc.) in priority order. The package reads values lazily on first access and caches them, or you can call read() upfront to fail fast if required values are missing.
The core design emphasizes type information: by specifying a cast function on each key, you get both runtime parsing and IDE type hints. It supports hierarchical configs via group_key, custom section and key names, optional parameters, and defaults. There are no runtime dependencies for Python 3.8+, though Python 3.6–3.7 requires typing_extensions.
Use it for:
- Load database credentials from environment variables with fallback to a shared INI file, with type-safe access in your application code.
- Define a multi-level config hierarchy (database, algorithm, logging) as nested classes and read from multiple sources with clear precedence.
- Validate and parse config values at startup with read() to catch missing required settings before the app starts serving requests.
- Use IDE autocomplete to discover available config keys while writing application code, avoiding string-based lookups.
- Build a 12-factor-app-compliant configuration system that prioritizes environment variables over checked-in defaults.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Reads typed configuration from multiple sources (environment variables, INI files) with IDE autocomplete support and zero runtime dependencies.
Yes. typed-config is a solid, low-friction choice for applications that need typed configuration with IDE support and multi-source fallback. The zero runtime dependencies, MIT license, and stable API make it safe to adopt. Dormant maintenance is not a concern given the package's narrow, well-defined scope and lack of known vulnerabilities. Install it if you want type-safe config without heavy frameworks.
Install
typed-config on PyPI
pip
pip install typed-configuv
uv add typed-configpoetry
poetry add typed-configInstalling typed-config
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance is dormant (last release 2024-04-02, 864 days ago), but the repository remains active and the package is stable enough for production use.
License in practice
MIT license is permissive; you can use this package freely in commercial and open-source projects without restriction.
Quickstart
pip install typed-config
# config.py
from typedconfig import Config, key, section
from typedconfig.source import EnvironmentConfigSource
@section('database')
class AppConfig(Config):
host = key(cast=str)
port = key(cast=int)
config = AppConfig()
config.add_source(EnvironmentConfigSource())
config.read()
# main.py
from config import config
print(config.host, config.port)
Python 3.6 or above required; Python 3.6–3.7 also requires typing_extensions (not automatically installed).
Verify before relying
- Whether typing_extensions is automatically installed for Python 3.6–3.7 or requires manual setup
- Performance characteristics when reading from network-based config sources
- Whether hierarchical config supports arbitrary nesting depth or has practical limits
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 864 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,788/month — #13,973 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: typed_config-2.0.3-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
python-decoupleReads configuration parameters from environment…
permissive · top 5,000 on PyPI
bestconfigLoads configuration from multiple file formats…
permissive · top 15,000 on PyPI
mypy-boto3-appconfigProvides type annotations and IDE…
permissive · top 15,000 on PyPI
environ-configLoads application configuration from…
permissive · top 15,000 on PyPI
click-configfileExtends click with configuration file support,…
permissive · top 15,000 on PyPI
commented-configparserExtends Python's standard ConfigParser to…
permissive · top 15,000 on PyPI
envparseParses environment variables with optional type…
permissive · top 15,000 on PyPI
ovos-configProvides Python and command-line access to…
permissive · top 15,000 on PyPI
typishTypish provides runtime type checking and…
permissive · top 5,000 on PyPI
dynaconfDynaconf manages application configuration…
permissive · top 5,000 on PyPI