pub1c-web/app/config.py
2021-10-07 14:31:12 +03:00

13 lines
243 B
Python

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')