Move inventory to new repo
This commit is contained in:
19
inventory-app/const.py
Normal file
19
inventory-app/const.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import os
|
||||
|
||||
def getenv_in(key, *vals):
|
||||
val = os.getenv(key)
|
||||
if val not in vals:
|
||||
raise ValueError("Got %s for %s, expected one of %s" % (repr(val), key, vals))
|
||||
return val
|
||||
|
||||
def file_exists(path):
|
||||
if not os.path.isfile(path):
|
||||
raise ValueError("Required file %s not found" % path)
|
||||
|
||||
ENVIRONMENT_TYPE = getenv_in("ENVIRONMENT_TYPE", "DEV", "PROD")
|
||||
|
||||
SECRET_KEY = os.environ["SECRET_KEY"]
|
||||
AWS_ENDPOINT_URL = os.environ["AWS_ENDPOINT_URL"]
|
||||
INVENTORY_ASSETS_BASE_URL = os.environ["INVENTORY_ASSETS_BASE_URL"]
|
||||
MONGO_URI = os.environ["MONGO_URI"]
|
||||
MEMBERS_HOST = os.environ["MEMBERS_HOST"]
|
Reference in New Issue
Block a user