35 lines
899 B
Python
35 lines
899 B
Python
from pathlib import Path
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
env_file_encoding="utf-8",
|
|
extra="ignore",
|
|
)
|
|
|
|
DATABASE_URL: str = "postgresql+asyncpg://fundtracer:fundtracer_dev@localhost:5432/fundtracer"
|
|
DATABASE_URL_SYNC: str = "postgresql://fundtracer:fundtracer_dev@localhost:5432/fundtracer"
|
|
REDIS_URL: str = "redis://localhost:6379/0"
|
|
|
|
UPLOAD_DIR: str = "./uploads"
|
|
|
|
OCR_API_KEY: str = ""
|
|
OCR_API_URL: str = ""
|
|
LLM_API_KEY: str = ""
|
|
LLM_API_URL: str = ""
|
|
LLM_MODEL: str = ""
|
|
|
|
SECRET_KEY: str = "change-me-in-production"
|
|
DEBUG: bool = True
|
|
|
|
@property
|
|
def upload_path(self) -> Path:
|
|
p = Path(self.UPLOAD_DIR)
|
|
p.mkdir(parents=True, exist_ok=True)
|
|
return p
|
|
|
|
|
|
settings = Settings()
|