27 lines
640 B
Python
27 lines
640 B
Python
|
|
"""
|
||
|
|
FastAPI application factory for issue-core.
|
||
|
|
"""
|
||
|
|
|
||
|
|
from fastapi import FastAPI
|
||
|
|
|
||
|
|
from .. import __version__
|
||
|
|
from .ingest import router as ingest_router
|
||
|
|
|
||
|
|
|
||
|
|
def create_app() -> FastAPI:
|
||
|
|
app = FastAPI(
|
||
|
|
title="issue-core",
|
||
|
|
description=(
|
||
|
|
"Authoritative task lifecycle manager for the Coulomb org. "
|
||
|
|
"POST /issues/ is the ingestion surface for activity-core's IssueSink."
|
||
|
|
),
|
||
|
|
version=__version__,
|
||
|
|
)
|
||
|
|
app.include_router(ingest_router)
|
||
|
|
|
||
|
|
@app.get("/healthz", tags=["meta"])
|
||
|
|
async def healthz() -> dict:
|
||
|
|
return {"status": "ok", "version": __version__}
|
||
|
|
|
||
|
|
return app
|