- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 220 for head_item (0.08 seconds)
-
tests/test_extra_routes.py
@app.delete("/items/{item_id}") def delete_item(item_id: str, item: Item): return {"item_id": item_id, "item": item} @app.head("/items/{item_id}") def head_item(item_id: str): return JSONResponse(None, headers={"x-fastapi-item-id": item_id}) @app.options("/items/{item_id}") def options_item(item_id: str):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 14.7K bytes - Click Count (0) -
docs_src/bigger_applications/app_an_py310/routers/items.py
responses={404: {"description": "Not found"}}, ) fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}} @router.get("/") async def read_items(): return fake_items_db @router.get("/{item_id}") async def read_item(item_id: str): if item_id not in fake_items_db: raise HTTPException(status_code=404, detail="Item not found")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 1011 bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/SKILL.md
app = FastAPI() @app.get("/items/{item_id}") async def read_item( item_id: Annotated[int, Path(ge=1, description="The item ID")], q: Annotated[str | None, Query(max_length=50)] = None, ): return {"message": "Hello World"} ``` instead of: ```python # DO NOT DO THIS @app.get("/items/{item_id}") async def read_item( item_id: int = Path(ge=1, description="The item ID"),
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 10.1K bytes - Click Count (0) -
tests/test_invalid_path_param.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.6K bytes - Click Count (0) -
docs/uk/docs/advanced/templates.md
Тож фрагмент: {% raw %} ```jinja <a href="{{ url_for('read_item', id=id) }}"> ``` {% endraw %} ...згенерує посилання на той самий URL, який оброблятиме *функція операції шляху* `read_item(id=id)`. Наприклад, з ID `42` це буде відображено як: ```html <a href="/items/42"> ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 4.9K bytes - Click Count (0) -
tests/test_invalid_sequence_param.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 1.5K bytes - Click Count (0) -
docs_src/path_params/tutorial002_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 143 bytes - Click Count (0) -
docs/es/docs/advanced/templates.md
Entonces, la sección con: {% raw %} ```jinja <a href="{{ url_for('read_item', id=id) }}"> ``` {% endraw %} ...generará un enlace hacia la misma URL que manejaría la *path operation function* `read_item(id=id)`. Por ejemplo, con un ID de `42`, esto se renderizaría como: ```html <a href="/items/42"> ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 3.6K bytes - Click Count (0) -
docs_src/query_params/tutorial002_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 219 bytes - Click Count (0) -
docs_src/query_params/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 250 bytes - Click Count (0)