dynaconf 3.2.12


pip install dynaconf

  Latest version

Released: Oct 10, 2025

Project Links

Meta
Author: Bruno Rocha
Requires Python: >=3.8

Classifiers

Development Status
  • 5 - Production/Stable

Framework
  • Django
  • Flask

Intended Audience
  • Developers

License
  • OSI Approved :: MIT License

Natural Language
  • English

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3
  • Python :: 3 :: Only
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Topic
  • Utilities
  • Software Development :: Libraries
  • Software Development :: Libraries :: Python Modules

dynaconf. new logo

dynaconf - Configuration Management for Python.

MIT License PyPI PyPI PyPI - Downloads CI codecov Codacy Badge GitHub stars GitHub Release Date GitHub commits since latest release GitHub last commit Code Style Black

GitHub issues User Forum Join the chat at https://gitter.im/dynaconf/dev  Matrix

Features

  • Inspired by the 12-factor application guide
  • 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

$ pip install dynaconf

Initialize Dynaconf on project root directory

$ 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

.
โ”œโ”€โ”€ 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

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}

username = "admin"
port = 5555
database = {name='mydb', schema='main'}

Put sensitive information on .secrets.{toml|yaml|ini|json|py}

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 recommendation for production environments is to use the built-in support for Hashicorp Vault service for password and tokens.

Optionally you can now use environment variables to override values per execution or per environment.

# override `port` from settings.toml file and automatically casts as `int` value.
export DYNACONF_PORT=9900

On your code import the settings object

from path.to.project.config import settings

# Reading the settings

settings.username == "admin"  # dot notation with multi nesting support
settings.PORT == 9900  # case insensitive
settings['password'] == "secret123"  # dict like access
settings.get("nonexisting", "default value")  # Default values just like a dict
settings.databases.name == "mydb"  # Nested key traversing
settings['databases.schema'] == "main"  # Nested key traversing

More

  • Settings Schema Validation
  • Custom Settings Loaders
  • Vault Services
  • Template substitutions
  • etc...

There is a lot more you can do, read the docs: http://dynaconf.com

Contribute

Main discussions happens on Discussions Tab learn more about how to get involved on CONTRIBUTING.md guide

More

If you are looking for something similar to Dynaconf to use in your Rust projects: https://github.com/rubik/hydroconf

And a special thanks to Caneco for the logo.

3.2.12 Oct 10, 2025
3.2.11 May 06, 2025
3.2.10 Feb 17, 2025
3.2.9 Feb 16, 2025
3.2.8 Feb 16, 2025
3.2.7 Jan 21, 2025
3.2.6 Jul 19, 2024
3.2.5 Mar 18, 2024
3.2.4 Oct 31, 2023
3.2.3 Sep 13, 2023
3.2.2 Aug 26, 2023
3.2.1 Aug 11, 2023
3.2.0 Jul 13, 2023
3.1.12 Mar 02, 2023
3.1.11 Sep 22, 2022
3.1.10 Sep 22, 2022
3.1.9 Jun 06, 2022
3.1.8 Apr 15, 2022
3.1.7 Sep 09, 2021
3.1.5 Aug 20, 2021
3.1.4 Mar 08, 2021
3.1.3 Mar 04, 2021
3.1.3rc1 Mar 01, 2021
3.1.2 Oct 08, 2020
3.1.1 Sep 21, 2020
3.1.1rc6 Sep 21, 2020
3.1.1rc5 Sep 21, 2020
3.1.1rc4 Sep 19, 2020
3.1.1rc3 Sep 17, 2020
3.1.1rc2 Sep 14, 2020
3.1.1rc1 Sep 12, 2020
3.1.0 Aug 14, 2020
3.0.0 Jun 29, 2020
3.0.0rc2 Jun 22, 2020
3.0.0rc1 Mar 10, 2020
2.2.3 Feb 28, 2020
2.2.2 Dec 26, 2019
2.2.1 Dec 06, 2019
2.2.0 Oct 09, 2019
2.1.1 Sep 16, 2019
2.1.0 Sep 05, 2019
2.0.4 Aug 22, 2019
2.0.3 Jun 27, 2019
2.0.2 Apr 29, 2019
2.0.1 Apr 22, 2019
2.0.0 Apr 09, 2019
1.2.1 Mar 11, 2019
1.2.0 Nov 30, 2018
1.1.0 Oct 26, 2018
1.0.6 Sep 13, 2018
1.0.5 Sep 07, 2018
1.0.4 Sep 07, 2018
1.0.3 Jul 29, 2018
1.0.2 May 30, 2018
1.0.1 May 30, 2018
1.0.0 May 28, 2018
0.7.6 May 21, 2018
0.7.5 May 20, 2018
0.7.4 May 19, 2018
0.7.3 May 13, 2018
0.7.2 May 07, 2018
0.7.1 May 07, 2018
0.7.0 May 07, 2018
0.6.0 May 04, 2018
0.5.5 May 02, 2018
0.5.4 May 02, 2018
0.5.3 Mar 29, 2018
0.5.2 Oct 03, 2017
0.5.1 Sep 27, 2017
0.5.0 Sep 26, 2017
0.4.5 Mar 22, 2017
0.4.4 Mar 21, 2017
0.4.3 Mar 21, 2017
0.4.2 Mar 09, 2017
0.4.1 Feb 12, 2017
0.4.0 Feb 11, 2017
0.3.0 Oct 27, 2016
0.2.13 Jan 14, 2016
0.2.12 Jan 08, 2016
0.2.11 Jan 08, 2016
0.2.10 Jan 08, 2016
0.2.9 Jan 07, 2016
0.2.8 Jan 04, 2016
0.2.6 Dec 22, 2015
0.2.5 Dec 22, 2015
0.2.4 Dec 22, 2015
0.2.3 Dec 21, 2015
0.2.2 Dec 21, 2015
0.2.1 Dec 20, 2015
0.2.0 Dec 20, 2015
0.1.2 Aug 20, 2015
0.1.1 Aug 20, 2015
0.1.0 Aug 14, 2015

Wheel compatibility matrix

Platform Python 2 Python 3
any

Files in release

Extras:
Dependencies: