Flexible configuration orchestration for Python applications
Project description
ConfigBlanket
Flexible configuration orchestration for Python applications — load settings from code defaults, config files, environment variables, .env files, CI/CD variables, CLI arguments, and optional interactive prompts.
Features
- Multi-source loading with configurable precedence
- Source tracking — know where every value came from
- Typed config classes with validation
- Secret masking in repr, explain, and exports
- Nested configuration with
__env delimiter - Pluggable file parsers (JSON, YAML, TOML, INI, dotenv)
- CI/CD aware — auto-disables prompting in CI and non-TTY environments
- CLI help — auto-generated
--helpfrom your config schema
Default precedence
CLI > CI/CD env > OS env > .env > config files > code defaults > interactive prompt
Quick start
from configblanket import Config, field
class AppConfig(Config):
database_url: str = field(required=True, env="APP_DATABASE_URL", secret=True)
api_key: str = field(required=True, env="APP_API_KEY", secret=True)
debug: bool = field(default=False, env="APP_DEBUG", cli="--debug")
port: int = field(default=8000, env="APP_PORT", cli="--port")
config = AppConfig.load(
files=["config.yml", "config.local.toml"],
dotenv=".env",
cli=True,
interactive=True,
)
print(config.port)
print(config.source_of("port"))
print(config.explain())
Installation
pip install configblanket
pip install configblanket[yaml] # YAML support
pip install configblanket[toml] # TOML on Python < 3.11
pip install configblanket[all] # all optional extras
Documentation
Development
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[yaml,dev]"
pytest
python -m build
twine check dist/*
Releases are published to PyPI automatically when a GitHub Release is published. See PUBLISHING.md for setup.
License
Copyright (c) 2026 Yoseph
Released under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file configblanket-1.1.0.tar.gz.
File metadata
- Download URL: configblanket-1.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd8077c731b744aa19eccc0c48bb9a96d4da98801b4b9d33045ed5ae9134d3e1
|
|
| MD5 |
5a5756e5e48d97509efc43c272095796
|
|
| BLAKE2b-256 |
9541a7a3bbc40846f526530926ab72a9abfd0a7b39b66cd8e24b8e991914af11
|
Provenance
The following attestation bundles were made for configblanket-1.1.0.tar.gz:
Publisher:
publish.yml on yosephberhanu/configblanket
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
configblanket-1.1.0.tar.gz -
Subject digest:
cd8077c731b744aa19eccc0c48bb9a96d4da98801b4b9d33045ed5ae9134d3e1 - Sigstore transparency entry: 1758865953
- Sigstore integration time:
-
Permalink:
yosephberhanu/configblanket@c4d5c92b8fe45ed9923807e19209d278225c4324 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/yosephberhanu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c4d5c92b8fe45ed9923807e19209d278225c4324 -
Trigger Event:
release
-
Statement type:
File details
Details for the file configblanket-1.1.0-py3-none-any.whl.
File metadata
- Download URL: configblanket-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d55596fc4f8623e36827993e12f8fb7c5db030699f21d88e1e1a6e4d6f34d6d7
|
|
| MD5 |
26519929c36dcb3e68c31cef142944ef
|
|
| BLAKE2b-256 |
fad0f0f94b61cd2b8e8e6682c35438731729fdfbd10afb70b481cc5b68eef4b9
|
Provenance
The following attestation bundles were made for configblanket-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on yosephberhanu/configblanket
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
configblanket-1.1.0-py3-none-any.whl -
Subject digest:
d55596fc4f8623e36827993e12f8fb7c5db030699f21d88e1e1a6e4d6f34d6d7 - Sigstore transparency entry: 1758866067
- Sigstore integration time:
-
Permalink:
yosephberhanu/configblanket@c4d5c92b8fe45ed9923807e19209d278225c4324 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/yosephberhanu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c4d5c92b8fe45ed9923807e19209d278225c4324 -
Trigger Event:
release
-
Statement type: