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()