Loads TOML, YAML, JSON, INI, or Python settings with environment overrides, optional Vault or Redis backends, and Flask or Django hooks.
Overview
Dynaconf is a Python library for managing application configuration. It centralizes defaults, validation, parsing, and templating while keeping sensitive values in separate secret files or external stores.
Settings can live in multiple file formats, including TOML, YAML, JSON, INI, and Python modules, with optional custom loaders. Environment variables override values at runtime, including dotenv support, and layered profiles cover default, development, testing, and production style environments.
Hashicorp Vault and Redis can back settings and secrets. Extensions integrate with Flask and Django so framework config objects become Dynaconf-backed without rewriting application code. A CLI supports init, list, write, validate, and export workflows for project bootstrap.
Typical setup creates a config module that exposes a settings object, alongside optional settings and secrets files. Prefixes such as DYNACONF_ or framework-specific prefixes map environment variables into nested keys, and secret files are expected to stay out of public repositories.
Key features
- Multi-format settings files
- Environment variable overrides
- Layered multi-environment profiles
- Separate secrets file support
- Hashicorp Vault integration
- Redis settings storage
- Flask and Django extensions
- CLI init, validate, and export
Use cases
- Centralize Python app configuration
- Keep secrets out of main settings files
- Switch behavior per deployment environment
- Load credentials from Vault in production
- Wire settings into Django or Flask apps