baseimage-tutorial-framework/lib/tfw/config/envvars.py

11 lines
359 B
Python
Raw Normal View History

2018-02-08 13:58:37 +00:00
from os import environ, getenv
from collections import namedtuple
2017-11-27 17:41:57 +00:00
TFW_PREFIX = 'TFW_'
tfwenvvars = {envvar.replace(TFW_PREFIX, '', 1): environ.get(envvar)
for envvar in environ.keys()
if envvar.startswith(TFW_PREFIX)}
tfwenv = namedtuple('tfwenvtuple', tfwenvvars)(**tfwenvvars)
2018-02-08 13:58:37 +00:00
AVATAO_SECRET = getenv('AVATAO_SECRET', 'secret')