29 lines
872 B
Python
29 lines
872 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
|
|
|
api_host: str = "0.0.0.0"
|
|
api_port: int = 8000
|
|
database_url: str = "postgresql+asyncpg://wecom:wecom_secret@localhost:5432/wecom_ai"
|
|
database_url_sync: str = "postgresql://wecom:wecom_secret@localhost:5432/wecom_ai"
|
|
|
|
jwt_secret: str = "change-me"
|
|
jwt_algorithm: str = "HS256"
|
|
jwt_expire_minutes: int = 60
|
|
|
|
wecom_corp_id: str = ""
|
|
wecom_agent_id: str = ""
|
|
wecom_secret: str = ""
|
|
wecom_token: str = ""
|
|
wecom_encoding_aes_key: str = ""
|
|
wecom_api_base: str = "https://qyapi.weixin.qq.com"
|
|
wecom_api_timeout: int = 10
|
|
wecom_api_retries: int = 2
|
|
log_level: str = "INFO"
|
|
log_json: bool = True
|
|
|
|
|
|
settings = Settings()
|