43 lines
1.0 KiB
Python
43 lines
1.0 KiB
Python
from pydantic_settings import BaseSettings
|
|
from functools import lru_cache
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
app_name: str = "Hadith Scholar API"
|
|
app_version: str = "0.1.0"
|
|
debug: bool = False
|
|
|
|
# PostgreSQL
|
|
pg_host: str = "pg.betelgeusebytes.io"
|
|
pg_port: int = 5432
|
|
pg_dbname: str = "REPLACE_ME"
|
|
pg_user: str = "REPLACE_ME"
|
|
pg_password: str = "REPLACE_ME"
|
|
pg_sslmode: str = "require"
|
|
|
|
# Neo4j
|
|
neo4j_uri: str = "neo4j+ssc://neo4j.betelgeusebytes.io:7687"
|
|
neo4j_user: str = "neo4j"
|
|
neo4j_password: str = "NEO4J-PASS"
|
|
|
|
# Qdrant
|
|
qdrant_host: str = "qdrant.vector.svc.cluster.local"
|
|
qdrant_port: int = 6333
|
|
qdrant_collection: str = "hadiths"
|
|
|
|
# Elasticsearch
|
|
es_host: str = "http://elasticsearch.elastic.svc.cluster.local:9200"
|
|
es_index: str = "hadiths"
|
|
|
|
# TEI (embeddings)
|
|
tei_url: str = "http://tei.ml.svc.cluster.local:80"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_prefix = "HADITH_"
|
|
|
|
|
|
@lru_cache()
|
|
def get_settings() -> Settings:
|
|
return Settings()
|