You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
543 B
Python

2 years ago
"""Application's configuration file"""
from pathlib import Path
# path configuration
# let's guess that :file:`config.py` is located here : :file:`{rootpath}/webapp/`
_here = Path(__file__).resolve().parent
rootpath = _here.parent
"root project directory"
from yaml import safe_load
# loads database credentials
local_params_file = rootpath / "params.yaml"
with open(local_params_file, 'r') as file_handle:
params_content = safe_load(file_handle)
dbadmin = params_content['dbadmin']
dbpassword = params_content['dbpassword']