Download src/config.py from BilalCode/TaskFlow: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/spaces/BilalCode/TaskFlow/resolve/main/src/config.py
- Command line
-
hf download hf://spaces/BilalCode/TaskFlow/src/config.py
-
curl -L -o config.py https://huggingface.co/spaces/BilalCode/TaskFlow/resolve/main/src/config.py
1.11 kB
| from pydantic_settings import BaseSettings | |
| from typing import List | |
| class Settings(BaseSettings): | |
| """Application settings loaded from environment variables.""" | |
| # Database | |
| DATABASE_URL: str | |
| # JWT Configuration | |
| JWT_SECRET: str | |
| JWT_ALGORITHM: str = "HS256" | |
| JWT_EXPIRATION_HOURS: int = 168 # 7 days | |
| # Better Auth Secret (must match frontend) | |
| BETTER_AUTH_SECRET: str | |
| # CORS Configuration | |
| CORS_ORIGINS: str = "http://localhost:3000" | |
| # OpenAI Configuration (supports OpenRouter) | |
| OPENAI_API_KEY: str | |
| OPENAI_MODEL: str = "gpt-4o-mini" | |
| OPENAI_BASE_URL: str = "" | |
| # MCP Server Configuration | |
| MCP_SERVER_PORT: int = 8001 | |
| MCP_SERVER_HOST: str = "localhost" | |
| # Environment | |
| ENVIRONMENT: str = "development" | |
| DEBUG: bool = True | |
| def cors_origins_list(self) -> List[str]: | |
| """Parse CORS_ORIGINS string into list.""" | |
| return [origin.strip() for origin in self.CORS_ORIGINS.split(",")] | |
| class Config: | |
| env_file = ".env" | |
| case_sensitive = True | |
| # Global settings instance | |
| settings = Settings() | |