feat:初始化工程
This commit is contained in:
18
config/setting.py
Normal file
18
config/setting.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# sqlite连接方式:sqlite:///
|
||||
database_url: str = "sqlite:///./logs.db"
|
||||
wechat_webhook: str = ""
|
||||
smtp_server: str = ""
|
||||
smtp_port: int = 587
|
||||
smtp_user: str = ""
|
||||
smtp_password: str = ""
|
||||
smtp_sender: str = "log-alert@example.com"
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user