from yaml import load, Loader config_params = {} with open('config/config.yml', encoding='utf-8') as f: config_params.update(load(f, Loader=Loader))