Coverage for docs_src/custom_response/tutorial001.py: 100%
6 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
« 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 UJSONResponse 1abcde
4app = FastAPI() 1abcde
7@app.get("/items/", response_class=UJSONResponse) 1abcde
8async def read_items(): 1abcde
9 return [{"item_id": "Foo"}] 1abcde