get_item() — fastapi Function Reference
Architecture documentation for the get_item() function in tutorial008d_an_py39.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 7d8a33a8_04b1_4073_feb2_1c103a6c4839["get_item()"] 8fadce14_e71d_0dd7_0217_9afd994e3a47["tutorial008d_an_py39.py"] 7d8a33a8_04b1_4073_feb2_1c103a6c4839 -->|defined in| 8fadce14_e71d_0dd7_0217_9afd994e3a47 style 7d8a33a8_04b1_4073_feb2_1c103a6c4839 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
docs_src/dependencies/tutorial008d_an_py39.py lines 21–30
def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
if item_id == "portal-gun":
raise InternalError(
f"The portal gun is too dangerous to be owned by {username}"
)
if item_id != "plumbus":
raise HTTPException(
status_code=404, detail="Item not found, there's only a plumbus here"
)
return item_id
Domain
Subdomains
Source
Frequently Asked Questions
What does get_item() do?
get_item() is a function in the fastapi codebase, defined in docs_src/dependencies/tutorial008d_an_py39.py.
Where is get_item() defined?
get_item() is defined in docs_src/dependencies/tutorial008d_an_py39.py at line 21.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free