get_item() — fastapi Function Reference
Architecture documentation for the get_item() function in tutorial008c_py39.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 4cf6502c_d1b0_6ee0_8d49_bfcbad26efc9["get_item()"] 9945f34a_6cad_d290_6580_372c6e8b13c0["tutorial008c_py39.py"] 4cf6502c_d1b0_6ee0_8d49_bfcbad26efc9 -->|defined in| 9945f34a_6cad_d290_6580_372c6e8b13c0 style 4cf6502c_d1b0_6ee0_8d49_bfcbad26efc9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
docs_src/dependencies/tutorial008c_py39.py lines 18–27
def get_item(item_id: str, username: 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
Defined In
Source
Frequently Asked Questions
What does get_item() do?
get_item() is a function in the fastapi codebase, defined in docs_src/dependencies/tutorial008c_py39.py.
Where is get_item() defined?
get_item() is defined in docs_src/dependencies/tutorial008c_py39.py at line 18.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free