The python-dotenv library reads key-value pairs from a .env file and create new environment variables from them. Usagefrom pathlib import Path from dotenv import load_dotenv, find_dotenv _ = load_dotenv(Path.cwd() / "conf" / "local" / ".env") # OR _ = load_dotenv(find_dotenv())