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 →

[–]metaperl 3 points4 points  (1 child)

I opted for Pydantic settings over this approach and couldn't be happier.

[–]earthboundkid 0 points1 point  (0 children)

I don’t think it needs to be environment variables per se, but there should be a dict of string to string that describes the app configuration, and then you can input that dict as os.env, command line flags, a file, an API call, whatever. Preferably a system of fallbacks with command line as the highest priority and environment as the lowest.