- Sort Score
- Num 10 results
- Language All
Results 231 - 240 of 316 for item_1 (0.06 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
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):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 445 bytes - Click Count (0) -
tests/test_tutorial/test_bigger_applications/test_main.py
}, "/items/{item_id}": { "get": { "tags": ["items"], "summary": "Read Item", "operationId": "read_item_items__item_id__get", "parameters": [ { "required": True, "schema": {"title": "Item Id", "type": "string"},Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 21.3K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial008_an_py39.py
app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ Union[str, None], Query( title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 511 bytes - Click Count (0) -
tests/test_tutorial/test_body_updates/test_tutorial001.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 6.6K bytes - Click Count (0) -
docs/ru/docs/tutorial/handling-errors.md
Если клиент запросит `http://example.com/items/foo` (`item_id` `"foo"`), то он получит статус-код 200 и ответ в формате JSON: ```JSON { "item": "The Foo Wrestlers" } ``` Но если клиент запросит `http://example.com/items/bar` (несуществующий `item_id` `"bar"`), то он получит статус-код 404 (ошибка "не найдено") и JSON-ответ в виде: ```JSON { "detail": "Item not found" } ``` /// tip | Подсказка
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 14.1K bytes - Click Count (0) -
docs_src/additional_responses/tutorial002_py310.py
from pydantic import BaseModel class Item(BaseModel): id: str value: str app = FastAPI() @app.get( "/items/{item_id}", response_model=Item, responses={ 200: { "content": {"image/png": {}}, "description": "Return the JSON item or an image.", } }, ) async def read_item(item_id: str, img: bool | None = None): if img:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 596 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial010_an_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 635 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial010_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 574 bytes - Click Count (0) -
docs/zh/docs/tutorial/path-params-numeric-validations.md
但是你仍然需要使用 `Path` 来声明路径参数 `item_id`。 如果你将带有「默认值」的参数放在没有「默认值」的参数之前,Python 将会报错。 但是你可以对其重新排序,并将不带默认值的值(查询参数 `q`)放到最前面。 对 **FastAPI** 来说这无关紧要。它将通过参数的名称、类型和默认值声明(`Query`、`Path` 等)来检测参数,而不在乎参数的顺序。 因此,你可以将函数声明为: {* ../../docs_src/path_params_numeric_validations/tutorial002.py hl[7] *} ## 按需对参数排序的技巧 如果你想不使用 `Query` 声明没有默认值的查询参数 `q`,同时使用 `Path` 声明路径参数 `item_id`,并使它们的顺序与上面不同,Python 对此有一些特殊的语法。Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 18 02:25:44 GMT 2024 - 4.6K bytes - Click Count (0) -
tests/test_tutorial/test_additional_responses/test_tutorial004.py
"openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items/{item_id}": { "get": { "responses": { "404": {"description": "Item not found"}, "302": {"description": "The item was moved"}, "403": {"description": "Not enough privileges"}, "200": {
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 4.9K bytes - Click Count (0)