Files
log-alert-service/config/setting.py
2025-10-19 22:16:27 +08:00

18 lines
406 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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