Home / Function/ update_item() — fastapi Function Reference

update_item() — fastapi Function Reference

Architecture documentation for the update_item() function in tutorial004_an_py39.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  756e9f8c_d6c9_b87d_d779_fc51beb06480["update_item()"]
  6090521b_d93f_63c5_35e9_28ccb407357a["tutorial004_an_py39.py"]
  756e9f8c_d6c9_b87d_d779_fc51beb06480 -->|defined in| 6090521b_d93f_63c5_35e9_28ccb407357a
  style 756e9f8c_d6c9_b87d_d779_fc51beb06480 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

docs_src/schema_extra_example/tutorial004_an_py39.py lines 17–43

async def update_item(
    *,
    item_id: int,
    item: Annotated[
        Item,
        Body(
            examples=[
                {
                    "name": "Foo",
                    "description": "A very nice Item",
                    "price": 35.4,
                    "tax": 3.2,
                },
                {
                    "name": "Bar",
                    "price": "35.4",
                },
                {
                    "name": "Baz",
                    "price": "thirty five point four",
                },
            ],
        ),
    ],
):
    results = {"item_id": item_id, "item": item}
    return results

Domain

Subdomains

Frequently Asked Questions

What does update_item() do?
update_item() is a function in the fastapi codebase, defined in docs_src/schema_extra_example/tutorial004_an_py39.py.
Where is update_item() defined?
update_item() is defined in docs_src/schema_extra_example/tutorial004_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