dynaconf
The dynamic configurator for your Python Project
What it is and what it does
Dynaconf is a configuration management library that centralizes application settings across multiple file formats (toml, yaml, json, ini, py) and environment layers. It reads from settings files, secrets files, and environment variables—with environment variables taking precedence—allowing the same codebase to adapt to development, testing, and production without code changes. The library handles type casting automatically, supports nested key access via dot notation or bracket syntax, and includes a CLI for initialization, validation, and export.
The package is designed around the 12-factor application pattern, making it especially useful for teams that need to separate configuration from code and protect sensitive data. It includes built-in extensions for Django and Flask, optional integration with Hashicorp Vault and Redis for centralized secrets storage, and schema validation for catching configuration errors early. With no runtime dependencies, it installs cleanly and integrates into existing projects with minimal friction.
Use it for:
- Manage database credentials, API keys, and other secrets separately from application code using .secrets files and environment variables
- Configure the same application for development, testing, and production environments using layered settings files without code changes
- Validate configuration schemas at startup to catch missing or malformed settings before the application runs
- Override specific settings per execution using environment variables without editing files
- Integrate with Django or Flask projects to centralize settings management across web framework configurations
- Store and retrieve secrets from Hashicorp Vault or Redis for teams requiring centralized secrets management
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Dynaconf manages application configuration across multiple file formats and environments, supporting environment variable overrides, secrets protection, and integration with Django and Flask.
Yes. Dynaconf is actively maintained, has no runtime dependencies, supports current Python versions, and solves a common problem—separating configuration from code—in a straightforward way. The MIT license imposes no restrictions. Use it if you need environment-based configuration, secrets protection, or multi-format settings support; skip it only if your project's configuration needs are minimal.
Install
dynaconf on PyPI
pip
pip install dynaconfuv
uv add dynaconfpoetry
poetry add dynaconfInstalling dynaconf
Before you install
Low friction installation with no runtime dependencies. Active maintenance—last release 9 days ago, repository at 4320 stars, supporting current Python versions (3.10–3.14).
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install dynaconf
from dynaconf import Dynaconf
settings = Dynaconf(
envvar_prefix="DYNACONF",
settings_files=['settings.toml', '.secrets.toml']
)
print(settings.username)
print(settings['database.name'])
Verify before relying
- Whether Vault and Redis integration require additional system setup or dependencies beyond the base package
- Performance characteristics when managing large configuration files or deeply nested structures
- Validation schema capabilities and whether they cover common use cases like type coercion and range constraints
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,190,562/month — #1,772 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dynaconf-3.3.5-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
environ-configLoads application configuration from…
permissive · top 15,000 on PyPI
PyStaticConfigurationLoads, validates, and reads configuration from…
permissive · top 15,000 on PyPI
python-dotenvReads key-value pairs from a .env file and sets…
permissive · top 100 on PyPI
typed-settingsLoads and merges settings from multiple sources…
permissive · top 5,000 on PyPI
pydantic-settings-azure-app-configurationLoads application configuration and secrets…
unclear · top 15,000 on PyPI
simple-settingsLoads and manages application settings from…
permissive · top 15,000 on PyPI
lib-layered-configLoads and merges configuration from multiple…
permissive · top 15,000 on PyPI
bestconfigLoads configuration from multiple file formats…
permissive · top 15,000 on PyPI
hvachvac is a Python client library for HashiCorp…
permissive · top 1,000 on PyPI
vyper-configVyper provides a unified configuration system…
permissive · top 15,000 on PyPI