- Sort Score
- Result 10 results
- Languages All
Results 241 - 250 of 540 for item_b (0.05 sec)
-
docs_src/app_testing/tutorial004_py39.py
from fastapi.testclient import TestClient items = {} @asynccontextmanager async def lifespan(app: FastAPI): items["foo"] = {"name": "Fighters"} items["bar"] = {"name": "Tenders"} yield # clean up items items.clear() app = FastAPI(lifespan=lifespan) @app.get("/items/{item_id}") async def read_items(item_id: str): return items[item_id] def test_read_items():Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.2K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial006_an_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 294 bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial004.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial002_an_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 322 bytes - Viewed (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})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 367 bytes - Viewed (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 }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 14.2K bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial003_py39.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/", include_in_schema=False) async def read_items():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 148 bytes - Viewed (0) -
docs/es/docs/tutorial/bigger-applications.md
/// ## Otro módulo con `APIRouter` { #another-module-with-apirouter } Digamos que también tienes los endpoints dedicados a manejar "items" de tu aplicación en el módulo `app/routers/items.py`. Tienes *path operations* para: * `/items/` * `/items/{item_id}` Es toda la misma estructura que con `app/routers/users.py`. Pero queremos ser más inteligentes y simplificar un poco el código.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 19.6K bytes - Viewed (0) -
docs/fr/docs/deployment/docker.md
from typing import Optional from fastapi import FastAPI app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Optional[str] = None): return {"item_id": item_id, "q": q} ``` * Vous devriez maintenant avoir une structure de répertoire telle que : ``` . ├── app │ └── main.py └── Dockerfile ```
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Nov 09 16:39:20 UTC 2024 - 7.5K bytes - Viewed (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})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 434 bytes - Viewed (0)