"""Pydantic settings configuration.""" from pydantic_settings import BaseSettings, SettingsConfigDict from typing import List from functools import lru_cache class Settings(BaseSettings): """Application settings.""" model_config = SettingsConfigDict( env_file=".env", env_file_encoding="utf-8", case_sensitive=True ) # Application APP_ENV: str = "development" APP_DEBUG: bool = True APP_NAME: str = "Service Request System" APP_VERSION: str = "1.0.0" APP_CORS_ORIGINS: str = "http://localhost:3000" # Database DATABASE_URL: str = "sqlite:///./service_request.db" # Redis REDIS_URL: str = "redis://localhost:6379/0" # RabbitMQ RABBITMQ_URL: str = "amqp://guest:guest@localhost:5672/" # JWT JWT_SECRET_KEY: str = "dev-secret-key-here-change-in-production" JWT_ALGORITHM: str = "HS256" JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = 30 # Email SMTP_SERVER: str = "smtp.gmail.com" SMTP_PORT: int = 465 SMTP_USERNAME: str = "" SMTP_PASSWORD: str = "" EMAIL_FROM: str = "" IMAP_SERVER: str = "imap.gmail.com" IMAP_PORT: int = 993 # SMS TWILIO_ACCOUNT_SID: str = "" TWILIO_AUTH_TOKEN: str = "" TWILIO_FROM_NUMBER: str = "" # Migration MANAGEENGINE_CONNECTION_STRING: str = "" # Platform integration PLATFORM_API_URL: str = "http://platform:8000" PLATFORM_API_KEY: str = "" PLATFORM_JWT_PUBLIC_KEY: str = "" PLATFORM_JWT_ALGORITHM: str = "RS256" @lru_cache() def get_settings() -> Settings: """Get cached settings instance.""" return Settings()