Flexible layered configuration management built on Pydantic Settings.
Project description
Durango
Durango is a lightweight configuration management toolkit that layers strongly typed settings, configuration files, environment variables, and programmatic overrides using Pydantic Settings. It is designed for CLI tools and services that need predictable precedence, multi-format config files, and clear error reporting.
Key Features
- Config precedence: defaults → config file → environment variables → user overrides.
- Format flexibility: parse YAML, JSON, or TOML files by default with optional extras.
- Typed settings: describe your configuration with Pydantic models and receive fully validated objects.
- Reload aware: refresh configuration at runtime and hook into lifecycle callbacks.
- Extensible: adapt environment prefixes, merge behaviour, and file lookup strategies to fit your application.
Quick Start
from durango import ConfigManager, DurangoSettings
class AppSettings(DurangoSettings):
debug: bool = False
api_url: str
manager = ConfigManager(
settings_type=AppSettings,
identifier="MYAPP",
default_file="~/.config/myapp/settings.yaml",
)
settings = manager.load()
print(settings.api_url)
If ~/.config/myapp/settings.yaml does not exist, Durango will create it and populate it with the model defaults before layering environment variables and runtime overrides.
Environment variables take the form MYAPP__API_URL=true. To override a nested section named database, use MYAPP__DATABASE__URL.
Documentation
- Docs site (WIP): see
docs/ - Architecture notes:
ARCH.md - Working session notes:
notes/STATUS.md
Contributing
See docs/contributing.md for full setup, workflow, and review guidelines. Highlights:
- Install dependencies with
uv sync --all-extras --dev. - Run
uv run invoke cibefore opening a pull request. - Publishing and release automation are covered in docs/publishing.md.
License
Durango is available under the MIT License. See LICENSE for details.
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 durango-0.1.1.tar.gz.
File metadata
- Download URL: durango-0.1.1.tar.gz
- Upload date:
- Size: 328.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0845fb4a6c90f1593f6a57e6bcf3f556a2af3c309ef68f4a01b5fdeda0d0d2e3
|
|
| MD5 |
c809b7c8a820bf09920faa738a3ae014
|
|
| BLAKE2b-256 |
ae6dacd084fd37ed8c0588a80800b64010a78a0f72c57994c02c324cde9f63fb
|
File details
Details for the file durango-0.1.1-py3-none-any.whl.
File metadata
- Download URL: durango-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a4849d710ffb9744888c44180dbe36a5054215b72baea7d6068053ffa000597
|
|
| MD5 |
071cbe7de063c21ecad5c19577e0adec
|
|
| BLAKE2b-256 |
67b02aed4b48148f7d8987b645c581a7153b09744d6d7c200e0054384e32af55
|