Initial commit
This commit is contained in:
50
backend/app/config.py
Normal file
50
backend/app/config.py
Normal file
@@ -0,0 +1,50 @@
|
||||
from functools import lru_cache
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
||||
|
||||
# URLs
|
||||
LOCAL_URL: str = "http://localhost"
|
||||
PUBLIC_URL: str = ""
|
||||
|
||||
# Database
|
||||
DATABASE_URL: str = "postgresql+asyncpg://congress:congress@postgres:5432/pocketveto"
|
||||
SYNC_DATABASE_URL: str = "postgresql://congress:congress@postgres:5432/pocketveto"
|
||||
|
||||
# Redis
|
||||
REDIS_URL: str = "redis://redis:6379/0"
|
||||
|
||||
# api.data.gov (shared key for Congress.gov and GovInfo)
|
||||
DATA_GOV_API_KEY: str = ""
|
||||
CONGRESS_POLL_INTERVAL_MINUTES: int = 30
|
||||
|
||||
# LLM
|
||||
LLM_PROVIDER: str = "openai" # openai | anthropic | gemini | ollama
|
||||
|
||||
OPENAI_API_KEY: str = ""
|
||||
OPENAI_MODEL: str = "gpt-4o"
|
||||
|
||||
ANTHROPIC_API_KEY: str = ""
|
||||
ANTHROPIC_MODEL: str = "claude-opus-4-6"
|
||||
|
||||
GEMINI_API_KEY: str = ""
|
||||
GEMINI_MODEL: str = "gemini-1.5-pro"
|
||||
|
||||
OLLAMA_BASE_URL: str = "http://host.docker.internal:11434"
|
||||
OLLAMA_MODEL: str = "llama3.1"
|
||||
|
||||
# News
|
||||
NEWSAPI_KEY: str = ""
|
||||
|
||||
# pytrends
|
||||
PYTRENDS_ENABLED: bool = True
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
|
||||
|
||||
settings = get_settings()
|
||||
Reference in New Issue
Block a user