import yaml y = yaml.safe_load(open("config.yaml", 'r')) print(y)