Orchestration layer around the jrunner Java JDBC CLI, replacing the previous shell-based sync system in .archive/pre-rewrite. Includes the FastAPI + Jinja web frontend, per-driver adapters (DB2, MSSQL, PG), wizard-driven module creation with editable dest types and source-sourced table/column descriptions, watermark/hook CRUD, and the engine that runs modules end-to-end. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
26 lines
798 B
Python
26 lines
798 B
Python
"""FastAPI app factory.
|
|
|
|
JSON endpoints live under ``/api``. HTML pages (added in a later
|
|
increment) will live at ``/``. Keeping them separate avoids
|
|
content-negotiation complexity and keeps the API curl-testable.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from fastapi import FastAPI
|
|
|
|
from .. import __version__, db, jrunner
|
|
from ..web import mount_web
|
|
from .routes import connections, introspect, modules, runs, system
|
|
|
|
|
|
def create_app() -> FastAPI:
|
|
app = FastAPI(title="Pipekit", version=__version__)
|
|
app.include_router(system.router)
|
|
app.include_router(connections.router, prefix="/api")
|
|
app.include_router(introspect.router, prefix="/api")
|
|
app.include_router(modules.router, prefix="/api")
|
|
app.include_router(runs.router, prefix="/api")
|
|
mount_web(app)
|
|
return app
|