def get_mandatory_env()

in app.py [0:0]


def get_mandatory_env(name):
    '''
    Reads the env variable, raises an exception if missing.
    '''
    if name not in os.environ:
        raise Exception("Missing os enviroment variable '%s'" % name)
    return os.environ.get(name)