Skip to content

Commit 2fd5345

Browse files
committed
add healthu check endpoint
1 parent ca9ee4d commit 2fd5345

File tree

1 file changed

+10
-0
lines changed
  • examples/python/servers/fastapi

1 file changed

+10
-0
lines changed

examples/python/servers/fastapi/main.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,16 @@ async def dynamic_price_middleware(request: Request, call_next):
136136
)
137137

138138

139+
@app.api_route("/", methods=["GET", "HEAD"])
140+
async def health_check():
141+
return {"status": "ok"}
142+
143+
144+
@app.api_route("/health", methods=["GET", "HEAD"])
145+
async def health_check():
146+
return {"status": "ok"}
147+
148+
139149
@app.get("/acp-budget")
140150
async def acp_budget() -> Dict[str, Any]:
141151
return {

0 commit comments

Comments
 (0)