import os from pathlib import Path from typing import Optional from pydantic_settings import BaseSettings, SettingsConfigDict BASE_DIR = Path(__file__).resolve().parent.parent.parent class Settings(BaseSettings): # --- Project Metadata --- PROJECT_NAME: str = "Neuroassist CNN Service" # S3 compatible storage. AWS_ENDPOINT_URL_S3:str AWS_ACCESS_KEY_ID:str AWS_SECRET_ACCESS_KEY:str AWS_REGION:str NEON_BUCKET:str REDIS_URL:str # For redis queueing # --- File Paths (Dynamic for Local/Cloud compatibility) --- model_config = SettingsConfigDict( env_file=str(BASE_DIR / ".env"), env_file_encoding="utf-8", extra="ignore" # Ignores extra variables in .env that aren't defined here ) # Create a singleton instance to be used across the app settings = Settings()