- Sort Score
- Num 10 results
- Language All
Results 251 - 260 of 543 for item_b (0.06 seconds)
-
docs_src/query_params_str_validations/tutorial005_py39.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items(q: str = Query(default="fixedquery", 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 - 276 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial006_an_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 294 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial002_an_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 322 bytes - Click Count (0) -
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)