21 lines
456 B
Python
21 lines
456 B
Python
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: int = 1
|
|
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
|
|
# 创建全局配置实例
|
|
settings = Settings() |