- Sort Score
- Num 10 results
- Language All
Results 161 - 170 of 1,076 for itemId (0.05 seconds)
-
docs_src/extra_data_types/tutorial001_py310.py
app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: datetime = Body(), end_datetime: datetime = Body(), process_after: timedelta = Body(), repeat_at: time | None = Body(default=None), ): start_process = start_datetime + process_after duration = end_datetime - start_process return { "item_id": item_id,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 724 bytes - Click Count (0) -
docs_src/path_params_numeric_validations/tutorial006_an_py310.py
from typing import Annotated from fastapi import FastAPI, Path, Query app = FastAPI() @app.get("/items/{item_id}") async def read_items( *, item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)], q: str, size: Annotated[float, Query(gt=0, lt=10.5)], ): results = {"item_id": item_id} if q: results.update({"q": q}) if size: results.update({"size": size})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 447 bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/query-params.md
"input": null } ] } ``` 由於 `needy` 是必填參數,你需要在 URL 中設定它: ``` http://127.0.0.1:8000/items/foo-item?needy=sooooneedy ``` ...這樣就會成功: ```JSON { "item_id": "foo-item", "needy": "sooooneedy" } ``` 當然,你可以同時定義部分參數為必填、部分有預設值、部分為選填: {* ../../docs_src/query_params/tutorial006_py310.py hl[8] *} 在此例中,有 3 個查詢參數: * `needy`,必填的 `str`。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 4.1K bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial006_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/", tags=["items"]) async def read_items(): return [{"name": "Foo", "price": 42}] @app.get("/users/", tags=["users"]) async def read_users(): return [{"username": "johndoe"}] @app.get("/elements/", tags=["items"], deprecated=True) async def read_elements():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 365 bytes - Click Count (0) -
docs_src/extra_data_types/tutorial001_an_py310.py
from datetime import datetime, time, timedelta from typing import Annotated from uuid import UUID from fastapi import Body, FastAPI app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: Annotated[datetime, Body()], end_datetime: Annotated[datetime, Body()], process_after: Annotated[timedelta, Body()], repeat_at: Annotated[time | None, Body()] = None, ):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 788 bytes - Click Count (0) -
docs_src/body_multiple_params/tutorial001_py310.py
app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None @app.put("/items/{item_id}") async def update_item( *, item_id: int = Path(title="The ID of the item to get", ge=0, le=1000), q: str | None = None, item: Item | None = None, ): results = {"item_id": item_id} if q: results.update({"q": q})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 546 bytes - Click Count (0) -
src/test/java/org/codelibs/fess/dict/synonym/SynonymItemTest.java
// Test that defensive copy handles null arrays correctly SynonymItem item1 = new SynonymItem(1, new String[] { "a" }, new String[] { "x" }); // Set to null item1.setNewInputs(null); item1.setNewOutputs(null); // Should return null, not crash assertNull(item1.getNewInputs()); assertNull(item1.getNewOutputs()); }Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Sun Jan 11 08:43:05 GMT 2026 - 8K bytes - Click Count (1) -
docs_src/dependencies/tutorial008b_an_py310.py
@app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id not in data: raise HTTPException(status_code=404, detail="Item not found") item = data[item_id] if item["owner"] != username: raise OwnerError(username)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 775 bytes - Click Count (0) -
docs_src/schema_extra_example/tutorial005_an_py310.py
from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Annotated[ Item, Body( openapi_examples={ "normal": {
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Aug 26 18:03:13 GMT 2023 - 1.5K bytes - Click Count (0) -
docs_src/additional_responses/tutorial004_py310.py
from pydantic import BaseModel class Item(BaseModel): id: str value: str responses = { 404: {"description": "Item not found"}, 302: {"description": "The item was moved"}, 403: {"description": "Not enough privileges"}, } app = FastAPI() @app.get( "/items/{item_id}", response_model=Item, responses={**responses, 200: {"content": {"image/png": {}}}},Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 669 bytes - Click Count (0)