smriti/backend/app/config.py
2026-03-22 13:48:50 +05:30

24 lines
590 B
Python

from pydantic_settings import BaseSettings
class Settings(BaseSettings):
"""Application settings loaded from environment variables."""
# App
app_name: str = "Smriti"
debug: bool = False
# Database
database_url: str = "postgresql://smriti:smriti@localhost:5432/smriti"
# OpenAI (for extraction service)
openai_api_key: str = ""
openai_model: str = "gpt-4o-mini"
# CORS
cors_origins: list[str] = ["http://localhost:5173", "http://localhost:3000"]
model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}
settings = Settings()