config.py 223 B

12345678910
  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)