"""Utility module that checks the env.""" import os DEV = 'dev' PROD = 'prod' name = os.environ.get('Environment', DEV) if name not in [DEV, PROD]: raise Exception( 'Environment value ({env}) is not valid.'.format(env=name))