You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
170 B

from fastapi import FastAPI, Path
app = FastAPI()
@app.get("/items/{item_id}")
def read_item(item_id: int = Path(..., ge=1, le=1000)):
return {"item_id": item_id}