Coverage for docs_src / path_operation_configuration / tutorial006_py310.py: 100%
11 statements
« prev ^ index » next coverage.py v7.13.3, created at 2026-04-06 01:24 +0000
« prev ^ index » next coverage.py v7.13.3, created at 2026-04-06 01:24 +0000
1from fastapi import FastAPI 1abcd
3app = FastAPI() 1abcd
6@app.get("/items/", tags=["items"]) 1abcd
7async def read_items(): 1abcd
8 return [{"name": "Foo", "price": 42}] 1efgh
11@app.get("/users/", tags=["users"]) 1abcd
12async def read_users(): 1abcd
13 return [{"username": "johndoe"}] 1ijkl
16@app.get("/elements/", tags=["items"], deprecated=True) 1abcd
17async def read_elements(): 1abcd
18 return [{"item_id": "Foo"}] 1mnop