skillfed

typed-settings

Typed settings based on attrs classes

typed-settings v25.3.0 2.0M downloads/30d#3,364 on PyPI
Permissive license MIT AGING released

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

uv

uv add typed-settings

poetry

poetry add typed-settings

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

configuration management typedsettings loader env varsconfig file parsing validationstructured settings configurationmulti-source config mergetyped configuration frameworksettings with type hints
configuration-managementtype-validation

More Python Modules packages