# dynaconf

> The dynamic configurator for your Python Project

- **URL**: https://www.freshcrate.ai/projects/dynaconf
- **Author**: Bruno Rocha
- **Category**: Frameworks
- **Latest version**: `3.2.13` (2026-04-21)
- **License**: MIT
- **Source**: https://github.com/dynaconf/dynaconf
- **Language**: Python
- **GitHub**: 4,285 stars, 319 forks
- **Registry**: pypi (`dynaconf`)
- **Tags**: `pypi`

## Description

<!-- [![Dynaconf](docs/img/logo_400.svg?sanitize=true)](http://dynaconf.com) -->

<p align="center"><img src="/art/header.png?v2" alt="dynaconf. new logo"></p>

> **dynaconf** - Configuration Management for Python.

[![MIT License](https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square)](/LICENSE) [![PyPI](https://img.shields.io/pypi/v/dynaconf.svg)](https://pypi.python.org/pypi/dynaconf) [![PyPI](https://img.shields.io/pypi/pyversions/dynaconf.svg)]() ![PyPI - Downloads](https://img.shields.io/pypi/dm/dynaconf.svg?label=pip%20installs&logo=python) [![CI](https://github.com/dynaconf/dynaconf/actions/workflows/main.yml/badge.svg)](https://github.com/dynaconf/dynaconf/actions/workflows/main.yml) [![codecov](https://codecov.io/gh/dynaconf/dynaconf/branch/master/graph/badge.svg)](https://codecov.io/gh/dynaconf/dynaconf) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/3fb2de98464442f99a7663181803b400)](https://www.codacy.com/gh/dynaconf/dynaconf/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=dynaconf/dynaconf&amp;utm_campaign=Badge_Grade)  ![GitHub stars](https://img.shields.io/github/stars/dynaconf/dynaconf.svg) ![GitHub Release Date](https://img.shields.io/github/release-date/dynaconf/dynaconf.svg) ![GitHub commits since latest release](https://img.shields.io/github/commits-since/dynaconf/dynaconf/latest.svg) ![GitHub last commit](https://img.shields.io/github/last-commit/dynaconf/dynaconf.svg) [![Code Style Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black/)

![GitHub issues](https://img.shields.io/github/issues/dynaconf/dynaconf.svg) [![User Forum](https://img.shields.io/badge/users-forum-blue.svg?logo=googlechat)](https://github.com/dynaconf/dynaconf/discussions) [![Join the chat at https://gitter.im/dynaconf/dev](https://badges.gitter.im/dynaconf/dev.svg)](https://gitter.im/dynaconf/dev?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![ Matrix](https://img.shields.io/badge/dev-room-blue.svg?logo=matrix)](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

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `3.2.13` | 2026-04-21 | Low | Imported from PyPI (3.2.13) |
| `3.2.12` | 2025-10-10 | Low | ## 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 |
| `3.2.11` | 2025-05-06 | Low | ## 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 |
| `3.2.10` | 2025-02-17 | Low | ### 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*. - |
| `3.2.9` | 2025-02-16 | Low | Release 3.2.9 |
| `3.2.8` | 2025-02-16 | Low | YANKED VERSION |
| `3.2.7` | 2025-01-21 | Low | 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 |
| `3.2.6` | 2024-07-19 | Low | ## [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 |
| `3.2.5` | 2024-03-18 | Low | ## [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 |
| `3.2.4` | 2024-02-10 | Low | ## 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 |

## Citation

- HTML: https://www.freshcrate.ai/projects/dynaconf
- Markdown: https://www.freshcrate.ai/projects/dynaconf.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/dynaconf/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
