RESOURCES / USING ENVIRONMENT VARIABLES FILE FOR PYTHON APPLICATIONS
Using environment variables file for Python Applications

import os
from dotenv import load_dotenv

load_dotenv()
environment_name = os.getenv('APP_ENVIRONMENT')
alternative_way = os.environ.get('APP_ENVIRONMENT')