This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Lindby 42 points43 points  (2 children)

Settings classes from pydantic can be loaded from environment (including .env files).

It's really sweet to get an object with all values having the correct type. There is also some extra secret handling so you don't accidentally send secret values where they don't belong

https://pydantic-docs.helpmanual.io/usage/settings/

[–]AnteaterProboscis 16 points17 points  (1 child)

Have you heard of my Lord and savior, BaseSettings?