API Reference

Dynaconf

A configuration management library for Python with environment layers, validators, and secrets.

Official Documentation ↗
CompatibilityThis documentation covers version v3. Check the official docs for the latest API surface.

Installation

pippip install dynaconf

Methods

Dynaconf layers settings files and environment variables and exposes them as dotted attributes.

Key Features

  • Layered settings by environment
  • Validators for required values
  • Vault and env var integration

Usage Notes

Pin a version and check the official docs for the API surface you depend on before upgrading.

Errors

The following points are quoted verbatim from the official documentation. 来源:https://www.dynaconf.com/ · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:49:19.315Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.

  • Warning To enable layered environments the argument environments must be set to True , otherwise, dynaconf will ignore layers and read all first-level keys as normal values. (https://www.dynaconf.com/)

FAQ

How do environment layers work?
Name your settings files or sections per environment and select one with the ENV_FOR_DYNACONF variable so overrides layer predictably.
How do I load secrets safely?
Point Dynaconf at a secrets file or a vault and keep that file out of version control, referencing values by key.
Can it validate at startup?
Yes. Register validators and call validate() during application init so missing settings fail fast.