Configuration Files in Python

5 projects in Python Toolchain. Most starred: hydra-core, python-dotenv and dynaconf.

configparser in the standard library reads and writes INI files and needs no dependencies. python-dotenv loads variables from a .env file into the environment, which is the usual way to configure local development without committing secrets. pydantic-settings declares settings as a typed Pydantic model and fills it from environment variables, .env files and secret files, with validation at startup so a missing or malformed value fails early.

Hydra, from Meta, composes hierarchical configuration from YAML files and lets you override any value from the command line, which is popular for machine learning experiments with many variants. Dynaconf layers settings from files, environment variables and external stores, supports per-environment sections such as development and production, and integrates with Django and Flask. For reading TOML, tomllib is in the standard library from Python 3.11.

python-dotenv

Reads key-value pairs from a.env file and sets them as environment variables.

8.9kupdated 23d ago1.2.4

pydantic-settings

Settings management using Pydantic models with validation, loading from environment variables and secrets files.

1.5kupdated 1d ago2.16.1

hydra-core

Hydra is a framework for elegantly configuring complex applications.

10.7kupdated today1.4.0rc1

dynaconf

Dynaconf is a configuration manager with plugins for Django and Flask.

4.3kupdated 23d ago3.3.5
Esc

Type to search every entry. ↑↓ to move, Enter to open.