- LfxClient (upload/run/info/delete, typed errors, serve-key auth) - Flows API: CRUD, versions, deploy, sync run, SSE stream proxy, runs - Approvals callback endpoint (flow terminal-state contract) - Runner: envelope in, status from approval side-effect (no interrupts) - Fixture generator (lfx serializers) + simple_rule/approval_handoff fixtures verified against real lfx serve - 14 tests green (real LFX subprocess + live uvicorn callback server)
26 lines
591 B
Python
26 lines
591 B
Python
from fastapi import FastAPI
|
|
|
|
from .flows.api import approvals_router, flows_router
|
|
from .settings import settings
|
|
|
|
app = FastAPI(
|
|
title="Kirche Einfach API",
|
|
description="KI-gestützte Verwaltungsplattform für Kirche",
|
|
version="0.1.0",
|
|
docs_url="/api/docs",
|
|
redoc_url="/api/redoc",
|
|
openapi_url="/api/openapi.json",
|
|
)
|
|
|
|
app.include_router(flows_router)
|
|
app.include_router(approvals_router)
|
|
|
|
|
|
@app.get("/")
|
|
async def root():
|
|
return {"message": "Kirche Einfach API", "version": settings.version}
|
|
|
|
|
|
@app.get("/health")
|
|
async def health():
|
|
return {"status": "ok"}
|