That provides typed and validated auto-loading from env vars. I have been quite happy with that in conjunction with an optional .toml file, to do flexible config cleanly and simply like:
import toml
from myproj.conf.types import Settings # a pydantic BaseSettings model
try:
_config = toml.load('myproj.toml')
except FileNotFoundError:
_config = {}
settings = Settings(
**{key.upper(): val for key, val in _config.items()}
)