mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-23 22:29:34 -05:00
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com> Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
11 lines
250 B
Python
11 lines
250 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 = 10):
|
|
return fake_items_db[skip : skip + limit]
|