- Sort Score
- Num 10 results
- Language All
Results 211 - 220 of 720 for itemId (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/query_params_str_validations/tutorial004_regex_an_py310.py
from typing import Annotated from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ str | None, Query(min_length=3, max_length=50, regex="^fixedquery$") ] = None, ): 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: Mon Nov 18 02:25:44 GMT 2024 - 366 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial007_an_py310.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 337 bytes - Click Count (0) -
docs/fr/docs/tutorial/path-params.md
{* ../../docs_src/path_params/tutorial001.py hl[6:7] *} La valeur du paramètre `item_id` sera transmise à la fonction dans l'argument `item_id`. Donc, si vous exécutez cet exemple et allez sur <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>, vous verrez comme réponse : ```JSON {"item_id":"foo"} ``` ## Paramètres de chemin typésCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Nov 09 16:39:20 GMT 2024 - 9.8K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial004_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ Union[str, None], Query(min_length=3, max_length=50, pattern="^fixedquery$") ] = None, ): 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 - 381 bytes - Click Count (0) -
docs_src/separate_openapi_schemas/tutorial002_py39.py
from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: Optional[str] = None app = FastAPI(separate_input_output_schemas=False) @app.post("/items/") def create_item(item: Item): return item @app.get("/items/") def read_items() -> list[Item]: return [ Item( name="Portal Gun",Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Aug 25 19:10:22 GMT 2023 - 518 bytes - Click Count (0) -
tests/test_tutorial/test_query_params/test_tutorial002.py
client = TestClient(mod.app) return client @pytest.mark.parametrize( ("path", "expected_json"), [ ( "/items/foo", {"item_id": "foo"}, ), ( "/items/bar?q=somequery", {"item_id": "bar", "q": "somequery"}, ), ], ) def test_read_user_item(client: TestClient, path, expected_json): response = client.get(path)Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 4.2K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial008_an_py310.py
app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ 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: results.update({"q": q})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 498 bytes - Click Count (0) -
docs_src/additional_responses/tutorial001_py39.py
from fastapi.responses import JSONResponse from pydantic import BaseModel class Item(BaseModel): id: str value: str class Message(BaseModel): message: str app = FastAPI() @app.get("/items/{item_id}", response_model=Item, responses={404: {"model": Message}}) async def read_item(item_id: str): if item_id == "foo": return {"id": "foo", "value": "there goes my hero"}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 506 bytes - Click Count (0) -
tests/test_ambiguous_params.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 2K bytes - Click Count (1) -
docs_src/query_params_str_validations/tutorial010_an_py310.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 622 bytes - Click Count (0)