Files
dcalc/backend/config/main.py
T
2026-07-06 18:30:50 +08:00

29 lines
669 B
Python

from pathlib import Path
from pydantic_settings import BaseSettings, SettingsConfigDict
BACKEND_DIR = Path(__file__).resolve().parents[1]
class Config(BaseSettings):
DEBUG_MODE: bool = True
WORKERS: int = 1
PORT: int = 27173
MCPPORT: int = 27174
REDIS_URL: str = 'redis://localhost:6379/1'
COLG_TOKEN: str = ''
HELPER_TOKEN: str = ''
HELPER_ID: str = ''
model_config = SettingsConfigDict(
env_file=(
str(BACKEND_DIR / 'config' / '.env'),
str(BACKEND_DIR / 'config' / '.env.dev'),
str(BACKEND_DIR / 'config' / '.env.prod'),
),
extra='ignore',
)
config = Config()