Configurations

Keeping Configurations Sane with Pydantic Settings

Configurations are a crucial aspect of any software project. There are many sources of configurations, such as environment variables, configuration files, and command-line arguments. For file-based configurations in python, YAML and TOML (or INI) are popular choices. I prefer YAML, though it is not without flaws, some of which can be addressed by Pydantic anyway like type safety etc. Pydantic is a data validation library for Python. It is built on top of Python type hints and provides runtime validation of data....

November 14, 2023 · 5 min · Raghava Dhanya