config.py 237 B

123456789101112
  1. from yaml import load
  2. from yaml import Loader
  3. class Config:
  4. def __init__(self, data):
  5. self.__dict__.update(**data)
  6. with open("config.yml") as f:
  7. config = load(f, Loader=Loader)
  8. config = Config(config)