typed-settings
Typed settings based on attrs classes
What it is and what it does
Typed Settings is a configuration framework that unifies loading settings from multiple sources—environment variables, config files, secret vaults, and custom sources—into a single typed Python object. You define your settings as a class with type annotations, and the library loads and merges values from all configured sources, converting them to the correct types and validating them. It handles nested structures, provides optional CLI integration, and supports value post-processing. The library has no mandatory dependencies beyond tomli on older Python versions; optional features like support for various class frameworks, templating, and file format readers are available via extras.
Typed Settings is designed for any Python application that needs structured configuration: server processes, containerized apps, command-line tools, and data-analysis scripts. It aims to solve the fragmentation of config libraries by offering a single, extensible interface that works with multiple file formats and sources, with full type safety and validation built in.
Use it for:
- Load server configuration from environment variables and a config file, merging both with environment taking precedence.
- Build a CLI tool where users can override settings via command-line flags while defaults come from a config file.
- Retrieve secrets from a vault and interpolate them into settings using templates.
- Define nested settings structures and validate all values on load.
- Extend the loader system to support a custom config source not built into the library.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Loads and merges settings from multiple sources (environment variables, config files, vaults) into a single typed and validated Python object.
Yes, with conditions. Typed Settings is stable and permissively licensed, with low install friction and no mandatory dependencies. It's well-suited for applications that need structured, validated configuration from multiple sources. However, the aging maintenance status (258 days since last release) means you should verify that the project remains actively supported for your use case before adopting it in a critical system.
Install
typed-settings on PyPI
pip
pip install typed-settingsuv
uv add typed-settingspoetry
poetry add typed-settingsInstalling typed-settings
Before you install
Low friction: pure Python wheel with only exceptiongroup and tomli as runtime dependencies. Marked as aging but stable—last release 258 days ago.
License in practice
MIT license (permissive): you can use this in commercial and proprietary projects with minimal restrictions, provided you include the license notice.
Quickstart
import typed_settings as ts
settings = ts.load(cls=Settings, appname="myapp")
print(settings)
Requires Python 3.10 or later; optional features require additional dependencies (attrs, Pydantic, Click, etc.).
Verify before relying
- Whether the aging maintenance status (258 days since last release) affects active security response.
- Performance characteristics when loading from many sources or with large nested settings structures.
- How well custom loaders and processors integrate with third-party type converters beyond cattrs.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — exceptiongroup, tomli |
| Maintenance | aging — 258 days since the last release |
| First released | |
| Downloads | 2,012,006/month — #3,364 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: typed_settings-25.3.0-py3-none-any.whl
Keywords: configuration, options, settings, types, validation
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
environ-configLoads application configuration from…
permissive · top 15,000 on PyPI
pydantic-settingsLoads and validates application settings from…
permissive · top 100 on PyPI
dynaconfDynaconf manages application configuration…
permissive · top 5,000 on PyPI
dotenvLoads environment variables from a .env file…
unclear · top 5,000 on PyPI
config-parserMerges configuration from YAML/JSON files,…
agpl · top 5,000 on PyPI
load-dotenvAutomatically loads environment variables from…
permissive · top 15,000 on PyPI
pytest-dotenvA pytest plugin that automatically loads…
permissive · top 5,000 on PyPI
cattrsConverts unstructured dictionaries into…
permissive · top 1,000 on PyPI
plasterPlaster provides a unified loader interface for…
permissive · top 5,000 on PyPI
python-dotenvReads key-value pairs from a .env file and sets…
permissive · top 100 on PyPI