Simple way to parse common datatypes from env vars.
Project description
magicenv
Simple way to parse common datatypes from env vars.
Setup
pip install magicenv
Usage
from magicenv import env
DB_HOST = env('DB_HOST', "localhost:1234") # string var
DB_NUM_TRANSACTIONS = env('DB_NUM_TRANSACTIONS', 1234) # int var
ENABLE_FEATURE_X = env('ENABLE_FEATURE_X', True) # bool var
DB_SERVERS = env('DB_SERVERS', ['server1', "server2"]) # interprets a comma separated string as a list
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
magicenv-0.1.0.tar.gz
(3.3 kB
view hashes)