medved/Config.py

15 lines
286 B
Python
Raw Permalink Normal View History

2018-04-02 22:41:10 +00:00
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import yaml
2018-08-02 17:42:09 +00:00
class Config(object):
def __init__(self):
with open('data/config.yaml') as config_file:
self.config = yaml.load(config_file)
def get(self, key, defval=None):
return self.config.get(key, defval)
cnf = Config()