reads .env files into os.environ
Project description
read_env reads .env.
Install
pip install read_env
Usage
Add variables to a .env file in your project.
# myapp/.env
DEBUG=true
PORT=5000
Call read_env to add the variables to os.environ.
# myapp/env.py
import os
from read_env import read_env
read_env()
assert os.environ['DEBUG'] == 'true'
assert int(os.environ['PORT']) == 5000
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
read_env-1.0.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for read_env-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3bcfb1a7e70a7ed2e272ddc6f9cf5f80a09ec54490f5f14b7892e64c7b2f7ac |
|
MD5 | 13c1a28b29bee87694098e1066c6678f |
|
BLAKE2b-256 | 853b31a0d4b3ca252138f579714df97cafca6f6df963a4e08e4c35b13eaa04e9 |