Dotenv handler for Python
Project description
Dotenv handler for Python
install
pip install dotenvy
sample usages
Common usage
from dotenvy import load_env, read_file from os import environ load_env(read_file('.env')) my_var = environ.get('MY_VAR')
Loading dotenv file to a dict with type casting
from dotenvy import read_file, truthy config = read_file('.env', schema={ 'HOSTNAME': str, 'PORT': int, 'IS_DEBUG': truthy, # can be 1/true/on/yes })
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dotenvy-0.1.0.tar.gz
(2.9 kB
view hashes)