pub1c-web/app/config.py

12 lines
242 B
Python
Raw Normal View History

2021-10-07 10:26:43 +00:00
import os
import yaml
def load_config(filename: str):
with open(filename, 'r', encoding='utf-8') as cfg_file:
return yaml.safe_load(cfg_file)
def config_location() -> str:
return os.getenv('WEBPUB1C_CONFIG', 'config.yml')