Metadata-Version: 2.4
Name: configblanket
Version: 0.1.0
Summary: Flexible configuration orchestration for Python applications
Project-URL: Homepage, https://github.com/yosephberhanu/configblanket
Project-URL: Documentation, https://github.com/yosephberhanu/configblanket/blob/main/docs/ARCHITECTURE.md
Project-URL: Repository, https://github.com/yosephberhanu/configblanket
Project-URL: Issues, https://github.com/yosephberhanu/configblanket/issues
Project-URL: Changelog, https://github.com/yosephberhanu/configblanket/blob/main/CHANGELOG.md
Author-email: Yoseph Berhanu <contact@yoseph.et>
Maintainer-email: Yoseph Berhanu <contact@yoseph.et>
License-Expression: MIT
License-File: LICENSE
Keywords: cli,configuration,dotenv,environment-variables,secrets,settings,toml,validation,yaml
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Classifier: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: all
Requires-Dist: pyyaml>=6.0; extra == 'all'
Requires-Dist: rich>=13.0; extra == 'all'
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'all'
Provides-Extra: dev
Requires-Dist: build>=1.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: pyyaml>=6.0; extra == 'dev'
Requires-Dist: tomli>=2.0; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Provides-Extra: prompt
Provides-Extra: rich
Requires-Dist: rich>=13.0; extra == 'rich'
Provides-Extra: toml
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'toml'
Provides-Extra: yaml
Requires-Dist: pyyaml>=6.0; extra == 'yaml'
Description-Content-Type: text/markdown

# ConfigBlanket

[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

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

## Default precedence

```
CLI > CI/CD env > OS env > .env > config files > code defaults > interactive prompt
```

## Quick start

```python
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

```bash
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

- [Architecture & design](docs/ARCHITECTURE.md)
- [Publishing to PyPI](PUBLISHING.md)
- [Changelog](CHANGELOG.md)

## Development

```bash
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](https://github.com/yosephberhanu/configblanket/releases) is published. See [PUBLISHING.md](PUBLISHING.md) for setup.

## License

Copyright (c) 2026 Yoseph

Released under the [MIT License](LICENSE).
