Files

31 lines
811 B
Python
Raw Permalink Normal View History

from pydantic_settings import BaseSettings
class Settings(BaseSettings):
postgres_host: str = "localhost"
postgres_port: int = 5432
postgres_db: str = "cvp"
postgres_user: str = "cvp"
postgres_password: str = "cvp_dev_password"
france_travail_client_id: str = ""
france_travail_client_secret: str = ""
adzuna_app_id: str = ""
adzuna_app_key: str = ""
ollama_base_url: str = "http://localhost:11434"
ollama_model: str = "phi3:mini"
model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}
@property
def database_url(self) -> str:
return (
f"postgresql+asyncpg://{self.postgres_user}:{self.postgres_password}"
f"@{self.postgres_host}:{self.postgres_port}/{self.postgres_db}"
)
settings = Settings()