Spaces:
Sleeping
Sleeping
| from pydantic_settings import BaseSettings | |
| from functools import lru_cache | |
| class Settings(BaseSettings): | |
| """Application settings loaded from environment variables.""" | |
| # MongoDB | |
| mongodb_url: str = "mongodb://localhost:27017" | |
| database_name: str = "pdf_merger" | |
| # JWT | |
| secret_key: str = "your-super-secret-key-change-in-production" | |
| algorithm: str = "HS256" | |
| access_token_expire_minutes: int = 30 | |
| # Application | |
| debug: bool = True | |
| # File paths | |
| upload_dir: str = "uploads" | |
| merged_dir: str = "merged" | |
| class Config: | |
| env_file = ".env" | |
| case_sensitive = False | |
| def get_settings() -> Settings: | |
| """Get cached settings instance.""" | |
| return Settings() | |