Coverage for docs_src/custom_response/tutorial001b.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-08-08 03:53 +0000

1from fastapi import FastAPI 1abcde

2from fastapi.responses import ORJSONResponse 1abcde

3 

4app = FastAPI() 1abcde

5 

6 

7@app.get("/items/", response_class=ORJSONResponse) 1abcde

8async def read_items(): 1abcde

9 return ORJSONResponse([{"item_id": "Foo"}]) 1abcde