Explanation
Defines a GET endpoint that returns a list of items
Examples
Get all items
@app.get("/items/")
def read_items():
return [{"name": "Item 1"}, {"name": "Item 2"}]
Defines a GET endpoint that returns a list of items
Get all items
@app.get("/items/")
def read_items():
return [{"name": "Item 1"}, {"name": "Item 2"}]