from pydantic_settings import BaseSettings from functools import lru_cache class Settings(BaseSettings): # Application app_name: str = "Find a Gram API" app_version: str = "1.0.0" debug: bool = False # Database database_url: str = "postgresql+asyncpg://findagram:findagram_pass@localhost:5432/findagram" # JWT secret_key: str = "your-super-secret-key-change-in-production" algorithm: str = "HS256" access_token_expire_minutes: int = 60 * 24 * 7 # 7 days # CORS cors_origins: list[str] = ["http://localhost:3001", "http://localhost:3000"] class Config: env_file = ".env" case_sensitive = False @lru_cache() def get_settings() -> Settings: return Settings()