python -m pip install python-dotenv# Install dotenv via: pip3 install python-dotenv # Load .env file using: from dotenv import load_dotenv load_dotenv() # Use the variable with: import os os.getenv("ACCESS_KEY") # For python users only pip install python-dotenv# install locally (recommended) npm install dotenv --save# with npm npm install dotenv # or with Yarn yarn add dotenvpip install python-dotenv(env) $ pip install python-dotenv# Install dotenv via: pip3 install python-dotenv # Load .env file using: from dotenv import load_dotenv load_dotenv() # Use the variable with: import os os.getenv("ACCESS_KEY")# file: .env SECRET_KEY=secret_token_here # filename: test.py """ create a file in local directory touch .env add entries with following format: SECRET_KEY=secret_token_here """ from dotenv import load_dotenv import os # By Default below line will load a file ".env" in current working directory load_dotenv(".env") secret_key = os.getenv('SECRET_KEY') print(secret_key) # output: > python .\test_env.py secret_token_here pip install python-dotenvpip install -U python-dotenv