Basic Health Check (Liveness)A basic liveness check returns a 200 OK status to signal that the python process is alive and responding.pythonfrom fastapi import FastAPI.
If the app is running, it returns status:healthy (json). No more specific health planned at this time. Perhaps check if we can have a running app w/o any module.serve().
app = FastAPI()
@app.get("/health", status_code=200)
async def liveness_check():
return {"status": "healthy"}
Basic Health Check (Liveness)A basic liveness check returns a 200 OK status to signal that the python process is alive and responding.pythonfrom fastapi import FastAPI.
If the app is running, it returns status:healthy (json). No more specific health planned at this time. Perhaps check if we can have a running app w/o any module.serve().