load_dotenvx

Load into os.environ and return the resolved values

Python

load_dotenvx()

Usage

Accepts paths and override, plus the shared keyword arguments. Unlike load_dotenv, this function returns a dictionary and does not accept stream=. PYTHON_DOTENV_DISABLED returns an empty dictionary.


from dotenvx import load_dotenvx
values = load_dotenvx(".env.production", strict=True)

Optional keyword arguments are strict, ignore (diagnostic codes), convention, key_files, and resolve_references. Reference resolution defaults to false.

markdown