import os import toml config_path = ( os.environ["JIMBRELLA_CONFIG"] if "JIMBRELLA_CONFIG" in os.environ else "/opt/jimbrella/config.toml" ) f = open(config_path) config = toml.load(f) f.close() FLASK_SECRET_KEY = config["flask"]["secret_key"] JFORM_TAKEAWAY_URL = config["jform"]["takeaway_url"] JFORM_GIVEBACK_URL = config["jform"]["giveback_url"] JFORM_BOOKMARK_DIR = config["jform"]["bookmark_dir"] DATABASE_PATH = config["db"]["db_path"] USERS_PATH = config["db"]["users_path"] DUE_HOURS = config["rules"]["due_hours"] LOG_PATH = config["logging"]["log_path"] ADMIN_LOG_PATH = config["logging"]["admin_log_path"]