☰
Debian Codegraph
@
0.141.1-2
0.141.1-1
0.135.3-1
/
/
docs_src
/
custom_response
/
tutorial001b_py310.py
☽
☼
docs_src/custom_response/tutorial001b_py310.py
code
plain
raw
Expat
(c) 2018 Sebastián RamÃrez
debian/copyright
1
from fastapi import FastAPI
2
from fastapi.responses import ORJSONResponse
3
4
app = FastAPI()
5
6
7
@app.get("/items/", response_class=ORJSONResponse)
8
async def read_items():
9
return ORJSONResponse([{"item_id": "Foo"}])