- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 784 for itemId (0.03 sec)
-
docs_src/body_multiple_params/tutorial003_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 class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item, user: User, importance: int = Body()):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 548 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial005_an_py310.py
from fastapi import Body, FastAPI 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( openapi_examples={ "normal": {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Aug 26 18:03:13 UTC 2023 - 1.5K bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial005_py39.py
from fastapi import Body, FastAPI 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: int, item: Item = Body( openapi_examples={ "normal": { "summary": "A normal example",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.4K bytes - Viewed (0) -
docs_src/query_params/tutorial006_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 301 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial001_an_py310.py
from typing import Annotated 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[str | None, Query(alias="item-query")] = 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 - 375 bytes - Viewed (0) -
fastapi/exceptions.py
```python from fastapi import FastAPI, HTTPException 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") return {"item": items[item_id]} ``` """ def __init__( self, status_code: Annotated[Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 6.8K bytes - Viewed (0) -
docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py
from pydantic.v1 import BaseModel class Item(BaseModel): name: str description: str | None = None size: float class ItemV2(BaseModelV2): name: str description: str | None = None size: float app = FastAPI() @app.post("/items/", response_model=ItemV2) async def create_item(item: Item):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 16:45:54 UTC 2025 - 407 bytes - Viewed (0) -
docs_src/pydantic_v1_in_v2/tutorial003_an_py39.py
from pydantic.v1 import BaseModel class Item(BaseModel): name: str description: Union[str, None] = None size: float class ItemV2(BaseModelV2): name: str description: Union[str, None] = None size: float app = FastAPI() @app.post("/items/", response_model=ItemV2) async def create_item(item: Item):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 445 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)