Files
ccdi/lsfx-mock-server/config/settings.py

31 lines
639 B
Python
Raw Normal View History

from pydantic_settings import BaseSettings
from typing import Optional
class Settings(BaseSettings):
"""全局配置类"""
# 应用配置
APP_NAME: str = "流水分析Mock服务"
APP_VERSION: str = "1.0.0"
DEBUG: bool = True
# 服务器配置
HOST: str = "0.0.0.0"
PORT: int = 8000
# 模拟配置
PARSE_DELAY_SECONDS: int = 4 # 文件解析延迟秒数
MAX_FILE_SIZE: int = 10485760 # 10MB
# 测试数据配置
INITIAL_PROJECT_ID: int = 1000
INITIAL_LOG_ID: int = 10000
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
settings = Settings()