2026-03-06 10:04:00 +01:00
|
|
|
from fastapi import FastAPI
|
|
|
|
|
|
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
2026-03-06 10:48:07 +01:00
|
|
|
|
2026-03-06 11:50:32 +01:00
|
|
|
@app.get("/health/{Status}")
|
|
|
|
|
def get_health(Status: int, q: str = "ok"):
|
|
|
|
|
return {"Status": Status, "q": q}
|
2026-03-06 10:48:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.get("/items/{item_id}")
|
|
|
|
|
def read_item(item_id: int, q: str | None = None):
|
|
|
|
|
return {"item_id": item_id, "q": q}
|