mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-06 02:26:46 +00:00
10 lines
242 B
Python
10 lines
242 B
Python
from fastapi import FastAPI
|
|
|
|
app = FastAPI()
|
|
|
|
fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
|
|
|
|
|
|
@app.get("/items/")
|
|
async def read_item(skip: int = 0, limit: int = 100):
|
|
return fake_items_db[skip:limit]
|