- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 331 for item_id (0.18 sec)
-
docs_src/query_params/tutorial005.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_user_item(item_id: str, needy: str): item = {"item_id": item_id, "needy": needy}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 192 bytes - Viewed (0) -
docs_src/bigger_applications/app_an_py39/routers/items.py
@router.get("/") async def read_items(): return fake_items_db @router.get("/{item_id}") async def read_item(item_id: str): if item_id not in fake_items_db: raise HTTPException(status_code=404, detail="Item not found") return {"name": fake_items_db[item_id]["name"], "item_id": item_id} @router.put( "/{item_id}", tags=["custom"], responses={403: {"description": "Operation forbidden"}}, )
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1011 bytes - Viewed (0) -
docs_src/body/tutorial003_py310.py
class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None app = FastAPI() @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:28:58 GMT 2024 - 324 bytes - Viewed (0) -
docs_src/query_params/tutorial006_py310.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 269 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial004_an_py39.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 317 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial001.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 402 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Path, Query app = FastAPI() @app.get("/items/{item_id}") async def read_items( item_id: Annotated[int, Path(title="The ID of the item to get")], q: Annotated[Union[str, None], Query(alias="item-query")] = None, ): results = {"item_id": item_id} if q: results.update({"q": q})
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 388 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial006.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 10 18:49:18 GMT 2023 - 345 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial006_py310.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 475 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial006_py39.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 519 bytes - Viewed (0)