- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 726 for item_e (0.03 sec)
-
tests/test_starlette_exception.py
app = FastAPI() items = {"foo": "The Foo Wrestlers"} @app.get("/items/{item_id}") async def read_item(item_id: str): if item_id not in items: raise HTTPException( status_code=404, detail="Item not found", headers={"X-Error": "Some custom header"}, ) return {"item": items[item_id]} @app.get("/http-no-body-statuscode-exception")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.4K bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial001_an_py310.py
app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None @app.put("/items/{item_id}") async def update_item( item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)], q: str | None = None, item: Item | None = None, ): results = {"item_id": item_id} if q: results.update({"q": q})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 579 bytes - Viewed (0) -
docs_src/body_updates/tutorial001_py310.py
} @app.get("/items/{item_id}", response_model=Item) async def read_item(item_id: str): return items[item_id] @app.put("/items/{item_id}", response_model=Item) async def update_item(item_id: str, item: Item): update_item_encoded = jsonable_encoder(item) items[item_id] = update_item_encoded
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 856 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial001_an_py39.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)], q: Union[str, None] = None, item: Union[Item, None] = None, ): results = {"item_id": item_id}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 610 bytes - Viewed (0) -
docs_src/dependencies/tutorial008b_an_py39.py
@app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id not in data: raise HTTPException(status_code=404, detail="Item not found") item = data[item_id] if item["owner"] != username: raise OwnerError(username)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 775 bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial004.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 9.3K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial008_an_py39.py
app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ Union[str, None], Query( title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 511 bytes - Viewed (0) -
tests/test_tutorial/test_body_updates/test_tutorial001.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 6.6K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial010_an_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 635 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial010_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 574 bytes - Viewed (0)