Loads environment variables from .env
file. Inspired by dotenv.
# .env
API_KEY=1234567890
From Python:
# myscript.py
import os
from dotenv import config
config()
print(os.environ['API_KEY']) # 1234567890
From the command line:
dotenv python myscript.py # 1234567890