Skip to content

Glossary: Building APIs with FastAPI

pydantic-settings

Also written: BaseSettings, Settings

A library that reads environment variables and a `.env` file into a validated Pydantic model. It keeps secrets such as `SECRET_KEY` out of the code.

Where the book teaches it

Related terms

.env filePydantic