Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chrimaho/965d3ef3ed0d69386033c8c795eefc36 to your computer and use it in GitHub Desktop.
Save chrimaho/965d3ef3ed0d69386033c8c795eefc36 to your computer and use it in GitHub Desktop.
# Endpoint: Health Check ----
@app.get \
( path="/api/health"
, summary="Health check"
, description="Check to ensure that the app is healthy and ready to run."
, tags=["App Info"]
, response_class=PlainTextResponse
, responses= \
{ 200: {"content": {"text/plain": {"schema": None}}}
}
)
def health():
return PlainTextResponse \
( "App is ready to go."
, status_code=200
, media_type="text/plain"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment