- Sort Score
- Num 10 results
- Language All
Results 151 - 160 of 362 for item_2 (0.05 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/zh-hant/docs/tutorial/handling-errors.md
### 回應結果 { #the-resulting-response } 如果用戶端請求 `http://example.com/items/foo`(`item_id` 為 `"foo"`),會收到 200 的 HTTP 狀態碼,以及以下 JSON 回應: ```JSON { "item": "The Foo Wrestlers" } ``` 但如果用戶端請求 `http://example.com/items/bar`(不存在的 `item_id` `"bar"`),會收到 404("not found")的 HTTP 狀態碼,以及以下 JSON 回應: ```JSON { "detail": "Item not found" } ``` /// tipCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 8.3K 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) -
fastapi/routing.py
from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None app = FastAPI() router = APIRouter() @router.put("/items/{item_id}") def replace_item(item_id: str, item: Item): return {"message": "Item replaced", "id": item_id} app.include_router(router) ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 193K bytes - Click Count (0) -
docs/tr/docs/tutorial/query-params.md
Bu durumda, şuraya giderseniz: ``` http://127.0.0.1:8000/items/foo?short=1 ``` veya ``` http://127.0.0.1:8000/items/foo?short=True ``` veya ``` http://127.0.0.1:8000/items/foo?short=true ``` veya ``` http://127.0.0.1:8000/items/foo?short=on ``` veya ``` http://127.0.0.1:8000/items/foo?short=yes ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 4.9K bytes - Click Count (0) -
docs/en/docs/tutorial/query-params.md
http://127.0.0.1:8000/items/foo?short=True ``` or ``` http://127.0.0.1:8000/items/foo?short=true ``` or ``` http://127.0.0.1:8000/items/foo?short=on ``` or ``` http://127.0.0.1:8000/items/foo?short=yes ``` or any other case variation (uppercase, first letter in uppercase, etc), your function will see the parameter `short` with a `bool` value of `True`. Otherwise as `False`.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 4.5K bytes - Click Count (0) -
docs/zh/docs/python-types.md
/// info | 信息 方括号中的这些内部类型称为“类型参数”(type parameters)。 在这个例子中,`str` 是传给 `list` 的类型参数。 /// 这表示:“变量 `items` 是一个 `list`,并且列表中的每一个元素都是 `str`”。 这样,即使是在处理列表中的元素时,编辑器也能给你提供支持: <img src="/img/python-types/image05.png"> 没有类型的话,这几乎是不可能做到的。 注意,变量 `item` 是列表 `items` 中的一个元素。 即便如此,编辑器仍然知道它是 `str`,并为此提供支持。 #### 元组和集合 { #tuple-and-set } 声明 `tuple` 和 `set` 的方式类似:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.6K bytes - Click Count (0) -
docs/fr/docs/tutorial/query-params.md
Dans ce cas, si vous allez sur : ``` http://127.0.0.1:8000/items/foo?short=1 ``` ou ``` http://127.0.0.1:8000/items/foo?short=True ``` ou ``` http://127.0.0.1:8000/items/foo?short=true ``` ou ``` http://127.0.0.1:8000/items/foo?short=on ``` ou ``` http://127.0.0.1:8000/items/foo?short=yes ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 5.3K bytes - Click Count (0) -
fastapi/param_functions.py
from typing import Annotated from fastapi import FastAPI, Path app = FastAPI() @app.get("/items/{item_id}") async def read_items( item_id: Annotated[int, Path(title="The ID of the item to get")], ): return {"item_id": item_id} ``` """ return params.Path( default=default, default_factory=default_factory, alias=alias,Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 68K bytes - Click Count (0) -
docs/ko/docs/python-types.md
대괄호 안의 내부 타입은 "type parameters"라고 부릅니다. 이 경우 `str`이 `list`에 전달된 타입 매개변수입니다. /// 이는 "변수 `items`는 `list`이고, 이 `list`의 각 아이템은 `str`이다"라는 뜻입니다. 이렇게 하면, 에디터는 리스트의 아이템을 처리하는 동안에도 지원을 제공할 수 있습니다: <img src="/img/python-types/image05.png"> 타입이 없으면, 이는 거의 불가능합니다. 변수 `item`이 리스트 `items`의 요소 중 하나라는 점에 주목하세요. 그리고 에디터는 여전히 이것이 `str`임을 알고, 그에 대한 지원을 제공합니다. #### Tuple과 Set { #tuple-and-set }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 13K bytes - Click Count (0) -
docs/tr/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 6K bytes - Click Count (0)