13 lines
279 B
Python
13 lines
279 B
Python
from fastapi import FastAPI
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/health/{Status}")
|
|
def get_health(Status: int, q: str = "ok"):
|
|
return {"Status": Status, "q": q}
|
|
|
|
|
|
@app.get("/items/{item_id}")
|
|
def read_item(item_id: int, q: str | None = None):
|
|
return {"item_id": item_id, "q": q} |