Download app/config.py from Modulo-6/api: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/spaces/Modulo-6/api/resolve/6d76dbb2a8d2a751cc49fa06e2ed33f9f6be5aa0/app/config.py
- Command line
-
hf download hf://spaces/Modulo-6/api@6d76dbb2a8d2a751cc49fa06e2ed33f9f6be5aa0/app/config.py
-
curl -L -o config.py https://huggingface.co/spaces/Modulo-6/api/resolve/6d76dbb2a8d2a751cc49fa06e2ed33f9f6be5aa0/app/config.py
1.25 kB
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| class Settings(BaseSettings): | |
| model_config = SettingsConfigDict( | |
| env_file=".env", | |
| case_sensitive=False, | |
| extra="ignore", | |
| ) | |
| # Base de datos (Supabase) | |
| supabase_url: str | |
| supabase_key: str | |
| # JWT — sin default para evitar secretos hardcodeados en código fuente | |
| jwt_secret: str | |
| jwt_algorithm: str = "HS256" | |
| jwt_expire_minutes: int = 60 | |
| # Entorno — controla comportamiento de endpoints de desarrollo | |
| environment: str = "development" | |
| # CORS — lista explícita de orígenes permitidos | |
| allowed_origins: list[str] = ["http://localhost:3000", "http://localhost:5173"] | |
| # Timeout HTTP para llamadas a módulos externos (segundos) | |
| http_timeout_seconds: float = 5.0 | |
| # URLs de módulos externos | |
| m1_hce_url: str = "http://localhost:8001" | |
| m2_turnos_url: str = "http://localhost:8002" | |
| m7_facturacion_url: str = "http://localhost:8080" | |
| m9_monitoreo_url: str = "http://localhost:8009" | |
| m10_core_url: str = "http://localhost:8010" | |
| # Si True, no llama a módulos externos (útil para desarrollo local sin stack completo) | |
| mock_external_services: bool = True | |
| settings = Settings() | |