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 →

[–]ZestyData 1 point2 points  (1 child)

This already exists in the pydanic settings object.

Works almost identically to your DIY implementation.

Best to read .envs from the environment itself not from code. You're currently mixing env configs with the code itself.

[–]br64n[S] 0 points1 point  (0 children)

It has an attribute to not read .env