| 1 |
from fastapi import FastAPI |
| 2 |
|
| 3 |
app = FastAPI() |
| 4 |
|
| 5 |
fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] |
| 6 |
|
| 7 |
|
| 8 |
@app.get("/items/") |
| 9 |
async def read_item(skip: int = 0, limit: int = 10): |
| 10 |
return fake_items_db[skip : skip + limit] |