Tools for exconverting environment variables to native python objects
Install env-excavator:
pip install env-excavator
Example use it in a project:
>>> import os >>> import excavator as env >>> os.environ['FROM_EMAIL'] = '[email protected]' >>> env.get('FROM_EMAIL') '[email protected]' >>> 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']