初始化

This commit is contained in:
ZZX9599
2025-09-02 18:51:50 +08:00
commit fe1b33a6e5
30 changed files with 1607 additions and 0 deletions

17
ds/config.py Normal file
View File

@ -0,0 +1,17 @@
import configparser
import os
# 读取配置文件路径
config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../config.ini")
# 初始化配置解析器
config = configparser.ConfigParser()
# 读取配置文件
config.read(config_path, encoding="utf-8")
# 暴露配置项(方便其他文件调用)
SERVER_CONFIG = config["server"]
MYSQL_CONFIG = config["mysql"]
JWT_CONFIG = config["jwt"]
LIVE_CONFIG = config["live"]