- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 429 for item_id (0.11 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}
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 192 bytes - Viewed (0) -
docs_src/body_updates/tutorial001_py39.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: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 900 bytes - Viewed (0) -
docs_src/using_request_directly/tutorial001.py
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 230 bytes - Viewed (0) -
docs_src/additional_status_codes/tutorial001.py
items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}} @app.put("/items/{item_id}") async def upsert_item( item_id: str, name: Union[str, None] = Body(default=None), size: Union[int, None] = Body(default=None), ): if item_id in items: item = items[item_id] item["name"] = name item["size"] = size return item else:
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 684 bytes - Viewed (0) -
docs_src/additional_status_codes/tutorial001_an_py310.py
items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}} @app.put("/items/{item_id}") async def upsert_item( item_id: str, name: Annotated[str | None, Body()] = None, size: Annotated[int | None, Body()] = None, ): if item_id in items: item = items[item_id] item["name"] = name item["size"] = size return item else:
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 686 bytes - Viewed (0) -
docs_src/dependencies/tutorial008c_an.py
print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") 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(
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 710 bytes - Viewed (0) -
docs_src/path_params/tutorial001.py
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 138 bytes - Viewed (0) -
docs_src/query_params/tutorial006_py310.py
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 269 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial004.py
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 280 bytes - Viewed (0) -
docs_src/query_params/tutorial006b.py
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 301 bytes - Viewed (0)