Files
next-tjwater-server/samples/peripheral/config.py
T

21 lines
705 B
Python

"""Server-only configuration. Reuses BizDB credentials, never browser config."""
from pathlib import Path
from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict
class SampleSettings(BaseSettings):
next_server_url: str = "http://127.0.0.1:8000"
db_name: str = "tjwater_v2"
project_code: str = "tjwater_v2"
cors_origins: list[str] = ["http://127.0.0.1:5173", "http://localhost:5173"]
enable_faults: bool = False
timeout_seconds: float = Field(default=5.0, ge=0.1, le=30)
model_config = SettingsConfigDict(
env_prefix="PERIPHERAL_SAMPLE_",
env_file=Path(__file__).resolve().parents[2] / ".env",
extra="ignore",
)