https://pypi.org/project/python-dotenv/

# test.py
import os
from dotenv import load_dotenv

load_dotenv()
os.environ['DOMAIN']

# .env file
DOMAIN=example.org