medved/Config.py
2018-08-02 20:42:09 +03:00

15 lines
286 B
Python

#!/usr/bin/python3
# -*- coding: utf-8 -*-
import yaml
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()