update_item() — fastapi Function Reference
Architecture documentation for the update_item() function in tutorial005_an_py310.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 5601a685_7f48_f74a_3d42_afbbec2e7a8e["update_item()"] 8a017bd3_f1f5_09c4_b81d_8f43759649f6["tutorial005_an_py310.py"] 5601a685_7f48_f74a_3d42_afbbec2e7a8e -->|defined in| 8a017bd3_f1f5_09c4_b81d_8f43759649f6 style 5601a685_7f48_f74a_3d42_afbbec2e7a8e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
docs_src/schema_extra_example/tutorial005_an_py310.py lines 17–54
async def update_item(
*,
item_id: int,
item: Annotated[
Item,
Body(
openapi_examples={
"normal": {
"summary": "A normal example",
"description": "A **normal** item works correctly.",
"value": {
"name": "Foo",
"description": "A very nice Item",
"price": 35.4,
"tax": 3.2,
},
},
"converted": {
"summary": "An example with converted data",
"description": "FastAPI can convert price `strings` to actual `numbers` automatically",
"value": {
"name": "Bar",
"price": "35.4",
},
},
"invalid": {
"summary": "Invalid data is rejected with an error",
"value": {
"name": "Baz",
"price": "thirty five point four",
},
},
},
),
],
):
results = {"item_id": item_id, "item": item}
return results
Domain
Subdomains
Source
Frequently Asked Questions
What does update_item() do?
update_item() is a function in the fastapi codebase, defined in docs_src/schema_extra_example/tutorial005_an_py310.py.
Where is update_item() defined?
update_item() is defined in docs_src/schema_extra_example/tutorial005_an_py310.py at line 17.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free