# ─── Web framework ───────────────────────────────────────────────────────────
fastapi==0.115.6
uvicorn[standard]==0.32.1        # ASGI server with websockets + uvloop

# ─── Data validation ─────────────────────────────────────────────────────────
pydantic==2.9.2
pydantic-settings==2.6.1        # Settings management from env / .env

# ─── Database ────────────────────────────────────────────────────────────────
sqlalchemy[asyncio]==2.0.36     # Async ORM — replaces raw aiosqlite calls
aiosqlite>=0.20.0               # Async SQLite driver for SQLAlchemy
alembic>=1.13.3                 # Schema migration tool
psycopg2-binary>=2.9.9          # Sync PostgreSQL driver for policies store

# ─── Kafka ───────────────────────────────────────────────────────────────────
aiokafka==0.11.0                # Async Kafka producer/consumer

# ─── HTTP client (for real PolicyClient / JWKS fetch in prod) ────────────────
httpx==0.27.2
requests>=2.33.1                # Required by platform_shared.keycloak_auth (JWKS fetch)

# ─── Auth (production JWT verification) ──────────────────────────────────────
python-jose[cryptography]==3.4.0

# ─── Observability ───────────────────────────────────────────────────────────
# structlog==24.4.0             # Uncomment for structured JSON logs
# opentelemetry-sdk             # Uncomment for OTLP tracing

# ─── Dev / local ─────────────────────────────────────────────────────────────
python-dotenv==1.2.2            # Load .env in local dev

# ─── Testing ─────────────────────────────────────────────────────────────────
pytest>=9.0.3
pytest-asyncio>=0.24.0          # Async test support
anyio[trio]>=4.6.2              # pytest-asyncio backend
