16 lines
251 B
Python
16 lines
251 B
Python
import yaml
|
|
from dict_deep import deep_get
|
|
|
|
conf = None
|
|
|
|
|
|
def read_config(filename):
|
|
with open(filename, 'r') as f:
|
|
global conf
|
|
conf = yaml.safe_load(f)
|
|
return conf
|
|
|
|
|
|
def get_value(key: str):
|
|
return deep_get(conf, key)
|