- Sort Score
- Num 10 results
- Language All
Results 191 - 200 of 402 for item_2 (0.14 seconds)
-
docs/en/docs/tutorial/handling-errors.md
```JSON { "item": "The Foo Wrestlers" } ``` But if the client requests `http://example.com/items/bar` (a non-existent `item_id` `"bar"`), that client will receive an HTTP status code of 404 (the "not found" error), and a JSON response of: ```JSON { "detail": "Item not found" } ``` /// tip When raising an `HTTPException`, you can pass any value that can be converted to JSON as the parameter `detail`, not only `str`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 8.9K bytes - Click Count (0) -
docs_src/custom_response/tutorial001_py310.py
from fastapi import FastAPI from fastapi.responses import UJSONResponse app = FastAPI() @app.get("/items/", response_class=UJSONResponse) async def read_items():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 197 bytes - Click Count (0) -
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/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/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/ja/docs/tutorial/handling-errors.md
### レスポンス結果 { #the-resulting-response } クライアントが`http://example.com/items/foo`(`item_id` `"foo"`)をリクエストすると、HTTPステータスコードが200で、以下のJSONレスポンスが返されます: ```JSON { "item": "The Foo Wrestlers" } ``` しかし、クライアントが`http://example.com/items/bar`(存在しない`item_id` `"bar"`)をリクエストした場合、HTTPステータスコード404("not found"エラー)と以下のJSONレスポンスが返されます: ```JSON { "detail": "Item not found" } ``` /// tip | 豆知識Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 11.2K bytes - Click Count (0) -
src/test/java/org/codelibs/core/io/SerializeUtilTest.java
assertEquals(arr.length, result.length); assertEquals(arr[0], result[0]); // Test ArrayList final List<String> list = new ArrayList<>(); list.add("item1"); list.add("item2"); binary = SerializeUtil.fromObjectToBinary(list); @SuppressWarnings("unchecked") final List<String> resultList = (List<String>) SerializeUtil.fromBinaryToObject(binary);
Created: Fri Apr 03 20:58:12 GMT 2026 - Last Modified: Sat Nov 22 11:21:59 GMT 2025 - 7.6K bytes - Click Count (0)