- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 524 for item_c (0.03 sec)
-
docs_src/app_testing/app_b_py39/main.py
return fake_db[item_id] @app.post("/items/", response_model=Item) async def create_item(item: Item, x_token: str = Header()): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item.id in fake_db: raise HTTPException(status_code=409, detail="Item already exists") fake_db[item.id] = item
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.1K 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/path_params_numeric_validations/tutorial003_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 268 bytes - Viewed (0) -
docs_src/app_testing/app_b_an_py39/main.py
return fake_db[item_id] @app.post("/items/", response_model=Item) async def create_item(item: Item, x_token: Annotated[str, Header()]): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item.id in fake_db: raise HTTPException(status_code=409, detail="Item already exists") fake_db[item.id] = item
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Aug 15 22:31:16 UTC 2024 - 1.1K bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial004_an_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 317 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial005_an_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 331 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial001_py39.py
from typing import Union from fastapi import FastAPI, Path, Query app = FastAPI() @app.get("/items/{item_id}") async def read_items( item_id: int = Path(title="The ID of the item to get"), q: Union[str, None] = Query(default=None, alias="item-query"), ): results = {"item_id": item_id} if q: results.update({"q": q})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 364 bytes - Viewed (0) -
docs_src/body/tutorial004_py310.py
from fastapi import FastAPI from pydantic import BaseModel 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, q: str | None = None): result = {"item_id": item_id, **item.model_dump()} if q: result.update({"q": q})Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 414 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial005_an_py310.py
from pydantic import BaseModel 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: int, item: Annotated[Item, Body(embed=True)]): results = {"item_id": item_id, "item": item}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 409 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial003_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: int, item: Item = Body( examples=[ { "name": "Foo", "description": "A very nice Item", "price": 35.4,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 574 bytes - Viewed (0)