update_item() — fastapi Function Reference
Architecture documentation for the update_item() function in tutorial005_an_py39.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 717118c9_c7ec_7a41_35a9_4169df27b631["update_item()"] bbfa8791_17be_06e9_dae2_92ad89ee16a5["tutorial005_an_py39.py"] 717118c9_c7ec_7a41_35a9_4169df27b631 -->|defined in| bbfa8791_17be_06e9_dae2_92ad89ee16a5 style 717118c9_c7ec_7a41_35a9_4169df27b631 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
docs_src/schema_extra_example/tutorial005_an_py39.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_py39.py.
Where is update_item() defined?
update_item() is defined in docs_src/schema_extra_example/tutorial005_an_py39.py at line 17.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free