Files
takeyourmeds/server/settings.py
T
Frank Schwenk 88bdf6f34b feat: overhaul with modular API, agent endpoints, migrations, backup and tests
- Split monolithic app.py into server/api/ routers
- Add Pydantic schemas for input validation
- Add /agent/* API with separate AGENT_TOKEN auth
- Replace static schema.sql with versioned migrations (datenerhaltend)
- Add tools/backup_db.py for SQLite backups
- Add Dockerfile HEALTHCHECK and compose.yml AGENT_TOKEN env
- Add pytest tests for user and agent API
- Update README with API docs and deployment safety notes
- Bump version to 1.2.0
2026-09-21 12:46:44 +02:00

32 lines
889 B
Python

from __future__ import annotations
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
app_pin: str = "1234"
jwt_secret: str = "dev-secret-change-me"
jwt_expire_days: int = 90
agent_token: str = "" # long-lived token for /agent/* endpoints
vapid_private_key: str = ""
vapid_public_key: str = ""
vapid_claims_email: str = "mailto:admin@schwenk.online"
openrouter_api_key: str = ""
openrouter_model: str = "google/gemini-2.0-flash-001"
db_path: str = "data/medis.sqlite"
meds_path: str = "meds.yaml"
messages_path: str = "messages.yaml"
public_dir: str = "public"
app_version: str = "1.2.0"
migrations_dir: str = "tools/migrations"
settings = Settings() # type: ignore[call-arg]