- Sort Score
- Num 10 results
- Language All
Results 41 - 50 of 1,076 for itemId (0.39 seconds)
-
docs/de/docs/tutorial/query-params.md
Wenn Sie nun zu: ``` http://127.0.0.1:8000/items/foo?short=1 ``` oder ``` http://127.0.0.1:8000/items/foo?short=True ``` oder ``` http://127.0.0.1:8000/items/foo?short=true ``` oder ``` http://127.0.0.1:8000/items/foo?short=on ``` oder ``` http://127.0.0.1:8000/items/foo?short=yes ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 4.9K bytes - Click Count (0) -
docs_src/body_nested_models/tutorial005_py310.py
class Image(BaseModel): url: HttpUrl name: str class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() image: Image | None = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item): results = {"item_id": item_id, "item": item}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 468 bytes - Click Count (0) -
docs_src/schema_extra_example/tutorial004_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,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jul 01 16:43:29 GMT 2023 - 786 bytes - Click Count (0) -
docs_src/body_multiple_params/tutorial003_py310.py
app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None class User(BaseModel): username: str full_name: str | None = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item, user: User, importance: int = Body()): results = {"item_id": item_id, "item": item, "user": user, "importance": importance}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 504 bytes - Click Count (0) -
docs_src/schema_extra_example/tutorial004_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( examples=[ { "name": "Foo",
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jul 01 16:43:29 GMT 2023 - 917 bytes - Click Count (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})Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 414 bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/SKILL.md
app = FastAPI() @app.get("/items/{item_id}") async def read_item( item_id: Annotated[int, Path(ge=1, description="The item ID")], q: Annotated[str | None, Query(max_length=50)] = None, ): return {"message": "Hello World"} ``` instead of: ```python # DO NOT DO THIS @app.get("/items/{item_id}") async def read_item( item_id: int = Path(ge=1, description="The item ID"),
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 10.1K bytes - Click Count (0) -
docs/zh/docs/tutorial/query-params.md
"input": null } ] } ``` `needy` 是必选参数,因此要在 URL 中设置值: ``` http://127.0.0.1:8000/items/foo-item?needy=sooooneedy ``` ...这样就正常了: ```JSON { "item_id": "foo-item", "needy": "sooooneedy" } ``` 当然,把一些参数定义为必选,为另一些参数设置默认值,再把其它参数定义为可选,这些操作都是可以的: {* ../../docs_src/query_params/tutorial006_py310.py hl[8] *} 本例中有 3 个查询参数:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 4.2K bytes - Click Count (0) -
docs_src/schema_extra_example/tutorial005_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: Item = Body( openapi_examples={ "normal": { "summary": "A normal example",
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Aug 26 18:03:13 GMT 2023 - 1.3K bytes - Click Count (0) -
docs/tr/docs/index.md
app = FastAPI() class Item(BaseModel): name: str price: float is_offer: bool | None = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: str | None = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}") def update_item(item_id: int, item: Item):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 23.2K bytes - Click Count (0)