""" Linux BenchTools - Configuration """ import os from pydantic_settings import BaseSettings class Settings(BaseSettings): """Application settings""" # API Configuration API_TOKEN: str = os.getenv("API_TOKEN", "CHANGE_ME_INSECURE_DEFAULT") API_PREFIX: str = "/api" # Database DATABASE_URL: str = os.getenv("DATABASE_URL", "sqlite:///./backend/data/data.db") # Upload configuration UPLOAD_DIR: str = os.getenv("UPLOAD_DIR", "./uploads") MAX_UPLOAD_SIZE: int = 50 * 1024 * 1024 # 50 MB # CORS CORS_ORIGINS: list = ["*"] # For local network access # Application info APP_NAME: str = "Linux BenchTools" APP_VERSION: str = "1.0.0" APP_DESCRIPTION: str = "Self-hosted benchmarking and hardware inventory for Linux machines" # Score weights for global score calculation SCORE_WEIGHT_CPU: float = 0.30 SCORE_WEIGHT_MEMORY: float = 0.20 SCORE_WEIGHT_DISK: float = 0.25 SCORE_WEIGHT_NETWORK: float = 0.15 SCORE_WEIGHT_GPU: float = 0.10 class Config: case_sensitive = True env_file = ".env" # Global settings instance settings = Settings()