--- id: typed-config version: "2.0.3" license: MIT license_treatment: permissive maintenance: dormant --- # typed-config — Typed, extensible, dependency free configuration reader for Python projects for multiple config sources and working well in IDEs for great autocomplete performance. License: permissive · Maintenance: dormant · Downloads: 84.8K/mo ## 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 above — 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 pip install typed-config uv add typed-config poetry add typed-config ## Installing 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_current - Install friction: low - Maintenance: dormant - Downloads: 84.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags typed configuration reader, config management with type hints, environment and file config, IDE autocomplete config, multi-source configuration, Python config parsing, structured config classes, configuration-management, type-hints, environment-variables [View on SkillFed](https://skillfed.io/packages/typed-config) · [View on PyPI](https://pypi.org/project/typed-config/)