refactor: move credentials to .env and add python-dotenv support
Replace hardcoded database credentials, ntfy tokens, and Uptime Kuma push URLs with environment variable lookups via python-dotenv. Add .env.example template and update .gitignore to exclude .env. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
# config/__init__.py
|
||||
# 统一配置导出接口
|
||||
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
# 数据库配置
|
||||
from .database import SQL_SERVER_CONFIG, SQL_SERVER_CONN, DB_CONFIG, ACCESS_DRIVER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user