from pydantic_settings import BaseSettings from typing import Optional class Settings(BaseSettings): # Japi Server 配置 host: str = "0.0.0.0" port: int = 8100 debug: bool = False # Japi 静态资源下载URL download_url: str = "https://api.jingrow.com/files" # 文件保留时间(小时) file_retention_hours: float = 0.25 # 15分钟 # 清理任务执行间隔(秒) cleanup_interval_seconds: int = 900 # 15分钟 class Config: env_file = ".env" # 创建全局配置实例 settings = Settings()