Skip to content

mhchia/env-excavator

 
 

Repository files navigation

env-excavator

image

image

Tools for exconverting environment variables to native python objects

Quickstart

Install env-excavator:

pip install env-excavator

Example use it in a project:

>>> import os
>>> import excavator as env
>>> os.environ['FROM_EMAIL'] = 'admin@example.com'
>>> env.get('FROM_EMAIL')
'admin@example.com'
>>> os.environ['DEBUG'] = 'True'
>>> env.get('DEBUG', type=bool)
True
>>> os.environ['ALLOWED_HOSTS'] = '.example.com,.example.net'
>>> env.get('ALLOWED_HOSTS', type=list)
['.example.com', '.example.net']

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 96.5%
  • Makefile 3.5%