diff --git a/lib/common.py b/lib/common.py new file mode 100644 index 0000000..42dbb57 --- /dev/null +++ b/lib/common.py @@ -0,0 +1,10 @@ +# common.py +import os, yaml + +def load_config(): + """ + conf/config.yaml 파일을 UTF-8로 읽어 파이썬 dict로 반환 + """ + path = os.path.join(os.path.dirname(__file__), '..', 'conf', 'config.yaml') + with open(path, encoding='utf-8') as f: + return yaml.safe_load(f)