Currently we use os.environ to access the envvars directly, which doesn't care about a .env file. If we use either dotenv library or pydantic-settings (my personal preference!) we can automatically load envvars from a .env file. pydantic-settings offers additional encapsulation of valdation and derived values.
Currently we use
os.environto access the envvars directly, which doesn't care about a.envfile. If we use eitherdotenvlibrary orpydantic-settings(my personal preference!) we can automatically load envvars from a.envfile.pydantic-settingsoffers additional encapsulation of valdation and derived values.