replace loadenv by pydantic-settings

This commit is contained in:
Robin COuret
2026-03-05 20:08:10 +01:00
parent 93712919ff
commit 01f9e9f05e
12 changed files with 34 additions and 32 deletions

19
server/src/app/config.py Normal file
View File

@@ -0,0 +1,19 @@
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
# Database
DATABASE_URI: str
# Language model
LANGUAGE_MODEL_API: str = "http://localhost:8080/v1"
LANGUAGE_MODEL_NAME: str = "SmolLM3-Q4_K_M.gguf"
# Security
ORIGIN: str
SECRET_KEY : str
ACCESS_TOKEN_EXPIRE_MINUTES: int
class Config:
env_file = ".env"
settings = Settings()