Description
<!-- [](http://dynaconf.com) --> <p align="center"><img src="/art/header.png?v2" alt="dynaconf. new logo"></p> > **dynaconf** - Configuration Management for Python. [](/LICENSE) [](https://pypi.python.org/pypi/dynaconf) []()  [](https://github.com/dynaconf/dynaconf/actions/workflows/main.yml) [](https://codecov.io/gh/dynaconf/dynaconf) [](https://www.codacy.com/gh/dynaconf/dynaconf/dashboard?utm_source=github.com&utm_medium=referral&utm_content=dynaconf/dynaconf&utm_campaign=Badge_Grade)     [](https://github.com/ambv/black/)  [](https://github.com/dynaconf/dynaconf/discussions) [](https://gitter.im/dynaconf/dev?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://matrix.to/#/#dynaconf:matrix.org) ## Features - Inspired by the [12-factor application guide](https://12factor.net/config) - Settings management (default values, validation, parsing, templating) - Protection of sensitive information (passwords/tokens) - Multiple file formats `toml|yaml|json|ini|py` and also customizable loaders. - Full support for environment variables to override existing settings (dotenv support included). - Optional layered system for multi environments `[default, development, testing, production]` - Built-in support for Hashicorp Vault and Redis as settings and secrets storage. - Built-in extensions for **Django** and **Flask** web frameworks. - CLI for common operations such as `init, list, write, validate, export`. - full docs on https://dynaconf.com ### Install ```bash $ pip install dynaconf ``` #### Initialize Dynaconf on project root directory ```plain $ cd path/to/your/project/ $ dynaconf init -f toml βοΈ Configuring your Dynaconf environment ------------------------------------------ π The file `config.py` was generated. ποΈ settings.toml created to hold your settings. π .secrets.toml created to hold your secrets. π the .secrets.* is also included in `.gitignore` beware to not push your secrets to a public repo. π Dynaconf is configured! read more on https://dynaconf.com ``` > **TIP:** You can select `toml|yaml|json|ini|py` on `dynaconf init -f <fileformat>` **toml** is the default and also the most recommended format for configuration. #### Dynaconf init creates the following files ```plain . βββ config.py # This is from where you import your settings object (required) βββ .secrets.toml # This is to hold sensitive data like passwords and tokens (optional) βββ settings.toml # This is to hold your application settings (optional) ``` On the file `config.py` Dynaconf init generates the following boilerpate ```py from dynaconf import Dynaconf settings = Dynaconf( envvar_prefix="DYNACONF", # export envvars with `export DYNACONF_FOO=bar`. settings_files=['settings.yaml', '.secrets.yaml'], # Load files in the given order. ) ``` > **TIP:** You can create the files yourself instead of using the `init` command as shown above and you can give any name you want instead of the default `config.py` (the file must be in your importable python path) - See more options that you can pass to `Dynaconf` class initializer on https://dynaconf.com #### Using Dynaconf Put your settings on `settings.{toml|yaml|ini|json|py}` ```toml username = "admin" port = 5555 database = {name='mydb', schema='main'} ``` Put sensitive information on `.secrets.{toml|yaml|ini|json|py}` ```toml password = "secret123" ``` > **IMPORTANT:** `dynaconf init` command puts the `.secrets.*` in your `.gitignore` to avoid it to be exposed on public repos but it is your responsibility to keep it safe in your local environment, also the recommendat
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 3.2.13 | Imported from PyPI (3.2.13) | Low | 4/21/2026 |
| 3.2.12 | ## What's Changed * Incremental improvment to access performance by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/1304 * fix: get method to return Any type. by @rochacbruno in https://github.com/dynaconf/dynaconf/pull/1314 * perf: add lru caching to `find_the_correct_casing` function by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/1326 **Full Changelog**: https://github.com/dynaconf/dynaconf/compare/3.2.11...3.2.12 | Low | 10/10/2025 |
| 3.2.11 | ## What's Changed Release version 3.2.11 Shortlog of commits since last release: - Bruno Rocha (9): @rochacbruno - fix(cli): handle empty hooks and boolean environments. - fix: Better way for CLI to find the Django Settings - fix: windows CI - feat: Run CLI as module with `python -m dynaconf` (#1290) - fix: use sys.argv instead of click.get_os_args (#1292) - fix: `-k` must exit code 1 when key do not exist (#1293) - feat: envless load file | Low | 5/6/2025 |
| 3.2.10 | ### Hot Fixes - Hotfix hook collector to avoid eager evaluation. (#1255). *By Bruno Rocha*. ### Bug Fixes - Parse data type on merge with comma separated value. *By Bruno Rocha*. ### Features - Add CLI command `debug-info` (#1251). *By Bruno Rocha*. - Add support for decorated hooks on settings files (#1246). *By Bruno Rocha*. - Add VAULT_TOKEN_RENEW_FOR_DYNACONF config/code (#1094) (#1242). *By Pedro Brochado*. - populate_obj takes convert_to_dict (#1237). *By Bruno Rocha*. - | Low | 2/17/2025 |
| 3.2.9 | Release 3.2.9 | Low | 2/16/2025 |
| 3.2.8 | YANKED VERSION | Low | 2/16/2025 |
| 3.2.7 | Async Release for Integration with Ansible Automation Platform ## What's Changed * [backport] fix(inspect): Fixed an error that would raise when using get_history with lazy values by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/1185 * [Backport 3.2] Fix early trigger of lazy value by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/1198 * AWX Integration fixes by @rochacbruno in https://github.com/dynaconf/dynaconf/pull/1204 ### Bug Fixes - lazy validator's defaul | Low | 1/21/2025 |
| 3.2.6 | ## [3.2.6](https://github.com/dynaconf/dynaconf/releases/tag/3.2.6) - 2024-07-19 ### Bug Fixes - Don't instantiate a Settings object for every hook call. ### Details SCENARIO: With a `function` as `_registered_hooks` every time a key is accessed on `settings` the `function` is invoked passing a `settings` object as first argument. BEFORE: The `settings` passed to the hook was instantiated for every call. AFTER: The `settings` is now a `TempSettingsHolder` that has no | Low | 7/19/2024 |
| 3.2.5 | ## [3.2.5](https://github.com/dynaconf/dynaconf/releases/tag/3.2.5) - 2024-03-18 ### Bug Fixes - `_bypass_evaluation` showing in end-user settings (#1071). *By Pedro Brochado*. - dependabot alert 21 about Django (on tests) (#1067). *By Bruno Rocha*. - include load with relative root path (#1049). *By Pedro Brochado*. ### Features - Add `@get` converter to alias existing keys (#1040). *By Bruno Rocha*. ### Docs - fix wrong info about validation trigger on insantiation (#1076). *By Pedro Bro | Low | 3/18/2024 |
| 3.2.4 | ## What's Changed ## Bugfix * non-str key raising type error #1005 by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/1008 * dynaconf_merge=False on nested structures by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/1012 * support for 'entrypoint-path' in FLASK_APP #946 by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/1014 * allow underscore in env name #1011 by @rochacbruno in https://github.com/dynaconf/dynaconf/pull/1015 * Fix link to configuration page by | Low | 2/10/2024 |
| 3.2.3 | ## What's Changed * fix: pep8 errors by @anderson-sousa in https://github.com/dynaconf/dynaconf/pull/995 * Fix #1000 Django AttributeError on admin by @rochacbruno in https://github.com/dynaconf/dynaconf/pull/1002 **Full Changelog**: https://github.com/dynaconf/dynaconf/compare/3.2.2...3.2.3 | Low | 9/13/2023 |
| 3.2.2 | ## What's Changed * Hooking: Add support for changing the wrapped class by @rochacbruno in https://github.com/dynaconf/dynaconf/pull/975 * Hotfix bypass evaluation #984 by @rochacbruno in https://github.com/dynaconf/dynaconf/pull/985 * Fix #976 from envvars parse True/False as booleans by @rochacbruno in https://github.com/dynaconf/dynaconf/pull/983 * Fix #982 glob on settings_files by @rochacbruno in https://github.com/dynaconf/dynaconf/pull/987 * Inspect Review by @pedro-psb in https://gi | Low | 8/26/2023 |
| 3.2.1 | ## What's Changed * CI - Test docker-compose pyyaml issue by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/964 * Support for multidoc yaml files by @mganisin in https://github.com/dynaconf/dynaconf/pull/825 * Fix: unexpected _bypass_evaluation in BoxList by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/966 * Doc advanced usage for cli overrides dynaconf settings fix #967 by @hugoprudente in https://github.com/dynaconf/dynaconf/pull/970 ## New Contributors * @mganisin | Low | 8/11/2023 |
| 3.2.0 | ## What's Changed * Add merge argumento to `loader.write` to fix #839 by @Mdslino in https://github.com/dynaconf/dynaconf/pull/875 * fix #876 - avoid failure on deleted cwd by @rochacbruno in https://github.com/dynaconf/dynaconf/pull/877 * Docs/add faq page by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/882 * CI - Prevent running when just doc changes are made by @pedro-psb in https://github.com/dynaconf/dynaconf/pull/885 * CI - Prevent running when just doc changes are made (fi | Low | 7/13/2023 |
| 3.1.12 | Release 3.1.12 | Low | 3/2/2023 |
| 3.1.11 | Dynaconf 3.1.11 Amadou Crookes (1): envars.md typo fix (#786) Bruno Rocha (19): Release version 3.1.9 Bump dev version to 3.1.10 Update badges demo repo will be replaced by a video tutorial soon Fix CI New data key casing must adapt to existing key casing (#795) Add test and docs about includes (#796) Removed vendor_src folder (#798) Replacing rochacbruno/ with dynaconf/ (# | Low | 9/22/2022 |
| 3.1.10 | YANKED - Go to 3.1.11 | Low | 9/22/2022 |
| 3.1.9 | ## What's Changed * Bump django from 2.2.27 to 2.2.28 in /example/django_pytest_pure by @dependabot in https://github.com/rochacbruno/dynaconf/pull/743 * Multiple fixes for 3.19 by @rochacbruno in https://github.com/rochacbruno/dynaconf/pull/756 * Organize pre-commit setup by @johnnv1 in https://github.com/rochacbruno/dynaconf/pull/757 * update docs site by @rochacbruno in https://github.com/rochacbruno/dynaconf/pull/758 ## New Contributors * @johnnv1 made their first contribution in htt | Low | 6/6/2022 |
| 3.1.8 | Release 3.1.8 | Low | 4/15/2022 |
| 3.1.7 | Release 3.1.7 | Low | 9/9/2021 |
| 3.1.6 | Release 3.1.6 | Low | 9/9/2021 |
| 3.1.5 | Release 3.1.5 | Low | 8/20/2021 |
| 3.1.4 | Release 3.1.4 | Low | 3/8/2021 |
| 3.1.3 | Release 3.1.3 | Low | 3/4/2021 |
| 3.1.3rc1 | Release 3.1.3rc1 | Low | 3/1/2021 |
| 3.1.2 | Release 3.1.2 | Low | 10/8/2020 |
| 3.1.1 | Andreas Poehlmann (1): Allow importing SEARCHTREE before settings are configured (#383) Bruno Rocha (38): Hot fix removing unused imports Merge branch 'master' of github.com:rochacbruno/dynaconf Removing invalid links, adding allert on old docs fix #369 and fix #371 (#372) Fix #359 lazy template substitution on nested keys (#375) Flask fizes and other issues included. (#376) Fix #379 dict like iteration (#38 | Low | 9/21/2020 |
| 3.1.1rc6 | Release 3.1.1rc6 | Low | 9/21/2020 |
| 3.1.1rc5 | Release 3.1.1rc5 | Low | 9/21/2020 |
| 3.1.1rc4 | Release 3.1.1rc4 | Low | 9/19/2020 |
| 3.1.1rc3 | Release 3.1.1rc3 | Low | 9/17/2020 |
| 3.1.1rc2 | Release 3.1.1rc2 | Low | 9/14/2020 |
| 3.1.1rc1 | Release 3.1.1rc1 | Low | 9/12/2020 |
| 3.1.0 | Release 3.1.0 | Low | 8/14/2020 |
| 3.0.0 | Release 3.0.0 | Low | 6/29/2020 |
| 3.0.0rc2 | Release 3.0.0rc2 | Low | 6/22/2020 |
| 3.0.0rc1 | Release 3.0.0rc1 | Low | 3/10/2020 |
| 2.2.3 | Release 2.2.3 | Low | 2/28/2020 |
| 2.2.2 | Release 2.2.2 | Low | 12/26/2019 |
| 2.2.1 | Release 2.2.1 | Low | 12/6/2019 |
| 2.2.0 | Release 2.2.0 | Low | 10/9/2019 |
| 2.1.1 | Release 2.1.1 | Low | 9/16/2019 |
| 2.1.0 | # Highlights: ## π²Nested envvars w/ DUNDER__KEYS (useful for #django) Lets say you have a configuration like this: `settings.py` ```py DATABASES = { 'default': { 'NAME': 'db', 'ENGINE': 'module.foo.engine', 'ARGS': {'timeout': 30} } } ``` And now you want to change the values of `ENGINE` to `other.module`, via environment variables you can use the format `${ENVVAR_PREFIX}_${VARIABLE}__${NESTED_ITEM}__${NESTED_ITEM}` Each `__` (dunder, a | Low | 9/5/2019 |
| 2.0.4 | Release 2.0.4 | Low | 8/22/2019 |
| 2.0.3 | Release 2.0.3 | Low | 6/27/2019 |
| 2.0.2 | Release 2.0.2 | Low | 4/29/2019 |
| 2.0.1 | Release 2.0.1 | Low | 4/22/2019 |
| 2.0.0 | Dynaconf 2.0.0 - Fix #129 get_fresh should be case insensitive - Fix #125 .configure was not loading `settings_module` passed as argument - Fix #127 fix YAML warnings and default to full_load - Allow disable of core loaders #122 - Added support for Jenkins secrets file #117 - Added more examples for includes #110 - Moved to Azure Pipelines CI #142 - Added 100% test coverage on windows (Unit & Functional tests) - Deprecated MERGE_ENABLED in favor of local dynaconf_merge - Fix #74 - Be | Low | 4/9/2019 |
| 1.2.1 | Release version 1.2.1 Shortlog of commits since last release: Bruno Rocha (9): Merge branch 'jperras-merge-multiple-settings-files' Merge branch 'master' of github.com:rochacbruno/dynaconf Fix #106 make PROJECT_ROOT_FOR_DYNACONF to work with custom paths Update dynaconf/utils/boxing.py Update dynaconf/utils/boxing.py Add release script and CHANGELOG in place of history. | Low | 3/11/2019 |
| 1.1.0 | - Added `MERGE_ENABLED_FOR_DYNACONF` with ability to merge nested dictionaries instead of replacing PR #88 - Support for dot notation to access nested dictionaries like `settings['KEY.OTHER.NESTED.DEEPER']` PR #93 - Support dotted notation for validators PR #98 - Fixed a bug in SETTINGS_MODULE cleanup when `.setenv` method was called PR #97 - Added Python 3.7 to test matrix PR #99 Bruno Rocha (8): add example for merge_configs Merge branch 'rsnyman-merge-settings' Me | Low | 10/26/2018 |
