- Sort Score
- Num 10 results
- Language All
Results 211 - 220 of 463 for item_b (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/query_params_str_validations/tutorial004_py39.py
from typing import Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Union[str, None] = Query( default=None, min_length=3, max_length=50, pattern="^fixedquery$" ), ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 367 bytes - Click Count (0) -
docs_src/path_operation_advanced_configuration/tutorial002_py39.py
from fastapi import FastAPI from fastapi.routing import APIRoute app = FastAPI() @app.get("/items/") async def read_items(): return [{"item_id": "Foo"}] def use_route_names_as_operation_ids(app: FastAPI) -> None: """ Simplify operation IDs so that generated API clients have simpler function names. Should be called only after all routes have been added. """ for route in app.routes:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 572 bytes - Click Count (0) -
docs/ru/docs/tutorial/path-params.md
{* ../../docs_src/path_params/tutorial001_py39.py hl[6:7] *} Значение параметра пути `item_id` будет передано в функцию в качестве аргумента `item_id`. Если запустите этот пример и перейдёте по адресу: <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>, то увидите ответ: ```JSON {"item_id":"foo"} ``` ## Параметры пути с типами { #path-parameters-with-types }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 14.2K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial008_py310.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: str | None = Query( default=None, title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 434 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial008_py39.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Union[str, None] = Query( default=None, title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 466 bytes - Click Count (0) -
tests/test_tutorial/test_additional_responses/test_tutorial001.py
def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar") assert response.status_code == 404, response.text assert response.json() == {"message": "Item not found"} def test_openapi_schema():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 4.3K bytes - Click Count (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial005.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 9.6K bytes - Click Count (0) -
docs/zh/docs/tutorial/path-params.md
这段代码把路径参数 `item_id` 的值传递给路径函数的参数 `item_id`。 运行示例并访问 <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>,可获得如下响应: ```JSON {"item_id":"foo"} ``` ## 声明路径参数的类型 使用 Python 标准类型注解,声明路径操作函数中路径参数的类型。 {* ../../docs_src/path_params/tutorial002.py hl[7] *} 本例把 `item_id` 的类型声明为 `int`。 /// check | 检查
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Dec 15 16:43:19 GMT 2024 - 7.4K bytes - Click Count (0) -
docs/pt/docs/tutorial/path-params.md
{* ../../docs_src/path_params/tutorial001_py39.py hl[6:7] *} O valor do parâmetro de path `item_id` será passado para a sua função como o argumento `item_id`. Então, se você executar este exemplo e acessar <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>, você verá uma resposta: ```JSON {"item_id":"foo"} ``` ## Parâmetros de path com tipos { #path-parameters-with-types }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 9.8K bytes - Click Count (0) -
docs/en/docs/tutorial/path-params-numeric-validations.md
/// ## Declare metadata { #declare-metadata } You can declare all the same parameters as for `Query`. For example, to declare a `title` metadata value for the path parameter `item_id` you can type: {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[10] *} /// noteCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 6.1K bytes - Click Count (0)