2026-04-14 09:59:51 +08:00

15 lines
300 B
Python

import yaml
def load_config(config_path):
"""
加载配置
Args:
config_path (str): 配置文件路径
Returns:
dict: 返回解析后的配置字典
"""
with open(config_path, "r", encoding="utf-8") as f:
config = yaml.safe_load(f)
return config