base.py
import os
from common import fileUtil
def __read_config():
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
settings_file = os.path.join(os.path.join(os.path.realpath(base_dir), "config"),
"settings.yml")
db_file = os.path.join(os.path.join(os.path.realpath(base_dir), "config"), "db.yml")
print(settings_file)
settings = fileUtil().connect_to(settings_file).parsed_data
db = fileUtil().connect_to(db_file).parsed_data
ENV = settings["env"]
source = settings["source"]
return ENV, db, source, settings
ENV, DB, dbc, settings = __read_config()