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(
files=["config.yml", "config.local.toml"],
dotenv=".env",
)
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.
Metadata
Release files for configblanket 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| configblanket-1.2.1.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| configblanket-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / configblanket-1.2.1.tar.gz
| Download URL | configblanket-1.2.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5aa9e403bbe66760a43b7234a861362717f9d5014e17d3c1fbdaa658c92682ae
|
|
BLAKE2b-256 checksum How to use checksums |
f7553c49f1a4b35e2d74531ad26cbd6d703d9ac28f086cc50a617b8ab2b54174
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.
Transparency logRelease files / configblanket-1.2.1-py3-none-any.whl
| Download URL | configblanket-1.2.1-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15aed47b5ede64f67e176bfcc2099ffc3ce46b262383097bc7471a8fb0a2360e
|
|
BLAKE2b-256 checksum How to use checksums |
05ecc4990ee468f6118ed0b3f3bc6d74d5eca3acb144ebe75d961e1ea4215076
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.
Transparency log