-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.py
38 lines (27 loc) · 1008 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import os
from dotenv import load_dotenv
# 加载.env文件
load_dotenv()
# 数据库配置
DB_USER = os.getenv('DB_USER')
DB_PASSWORD = os.getenv('DB_PASSWORD')
DB_HOST = os.getenv('DB_HOST')
DB_NAME = os.getenv('DB_NAME')
DATABASE_URL = f"mysql+pymysql://{DB_USER}:{DB_PASSWORD}@{DB_HOST}/{DB_NAME}?charset=utf8mb4"
# OpenAI配置
OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')
OPENAI_BASE_URL = os.getenv('OPENAI_BASE_URL')
# 消息组配置
MESSAGE_GROUP = os.getenv('MESSAGE_GROUP', '').split(',')
# TikHub API Token
TIKHUB_API_TOKEN = os.getenv('TIKHUB_API_TOKEN')
# 微信机器人地址
WXBOT_URL = os.getenv('WXBOT_URL')
FEISHU_APPID = os.getenv('FEISHU_APPID')
FEISHU_APP_SECRET = os.getenv('FEISHU_APP_SECRET')
# 超级管理员wxid
SUPER_ADMIN = os.getenv('SUPER_ADMIN').split(',')
DY_TOPIC_URL = os.getenv('DY_TOPIC_URL', 'https://creator.douyin.com')
AIPANSO_CODE = os.getenv('AIPANSO_CODE', '3456')
SHENLONGIP_URL = os.getenv('SHENLONGIP_URL', '')
IS_PROXY = os.getenv('IS_PROXY', 0)