/dotenv

Loads environment variables from .env file.

Primary LanguagePythonMIT LicenseMIT

dotenv

Loads environment variables from .env file. Inspired by dotenv.

Example

# .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