Dotenv handler for Python
Project description
Dotenv handler for Python
usages
Installing
pip install dotenvy
Running tests
pip install tox tox
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.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for dotenvy-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c20b1fcb3c4e027b63d476f9040ba7d8c78b18dd82b6b5a620dc0f3e4cb7473 |
|
MD5 | 80415cd2c1b5777b2102c90421d053b3 |
|
BLAKE2b-256 | 5083241d87db7de50a8bb1c1758c59bb6ed051a0775d98b765510cb7ba74d7f8 |