The python-dotenv library reads key-value pairs from a .env file and create new environment variables from them.

Usage
from pathlib import Path
from dotenv import load_dotenv, find_dotenv
 
 
_ = load_dotenv(Path.cwd() / "conf" / "local" / ".env")
 
# OR
 
_ = load_dotenv(find_dotenv())