15 lines
602 B
Python
15 lines
602 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
class Settings(BaseSettings):
|
|
app_name: str = "Nalati Tourism QA API"
|
|
app_env: str = "development"
|
|
api_prefix: str = "/api"
|
|
database_url: str = "postgresql+psycopg://nalati:change-this-password@127.0.0.1:5432/nalati_rag"
|
|
cors_origins: str = "http://localhost:5173,http://127.0.0.1:5173"
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
@property
|
|
def cors_origin_list(self) -> list[str]:
|
|
return [x.strip() for x in self.cors_origins.split(",") if x.strip()]
|
|
|
|
settings = Settings()
|