- Sort Score
- Num 10 results
- Language All
Results 171 - 180 of 1,543 for item (0.02 seconds)
-
docs_src/body/tutorial002_py310.py
from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None app = FastAPI() @app.post("/items/") async def create_item(item: Item): item_dict = item.model_dump() if item.tax is not None: price_with_tax = item.price + item.tax item_dict.update({"price_with_tax": price_with_tax})Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 447 bytes - Click Count (0) -
docs/zh/docs/tutorial/body-multiple-params.md
/// ## 嵌入单个请求体参数 { #embed-a-single-body-parameter } 假设你只有一个来自 Pydantic 模型 `Item` 的请求体参数 `item`。 默认情况下,**FastAPI** 将直接期望这样的请求体。 但是,如果你希望它期望一个拥有 `item` 键并在值中包含模型内容的 JSON,就像在声明额外的请求体参数时所做的那样,则可以使用一个特殊的 `Body` 参数 `embed`: ```Python item: Item = Body(embed=True) ``` 比如: {* ../../docs_src/body_multiple_params/tutorial005_an_py310.py hl[17] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:37:57 GMT 2026 - 4.9K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/service/ProtwordsService.java
/** * Gets a specific protected words item by ID. * @param dictId the dictionary ID * @param id the item ID * @return the protected words item if found */ public OptionalEntity<ProtwordsItem> getProtwordsItem(final String dictId, final long id) { return getProtwordsFile(dictId).map(file -> file.get(id).get()); } /** * Stores a protected words item (insert or update).Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Aug 07 03:06:29 GMT 2025 - 4.3K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/suggest/SuggesterIndexLifecycleTest.java
readings[0] = new String[] { "test" }; SuggestItem item = new SuggestItem(new String[] { "テスト" }, readings, new String[] { "content" }, 1, 0, -1, new String[] { "tag1" }, new String[] { SuggestConstants.DEFAULT_ROLE }, null, SuggestItem.Kind.DOCUMENT); suggester.indexer().index(item); suggester.refresh();
Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Sat Mar 14 02:35:38 GMT 2026 - 13.4K bytes - Click Count (0) -
cmd/iam-object-store.go
res = make(map[string][]string) ctx, cancel := context.WithCancel(ctx) defer cancel() for item := range listIAMConfigItems(ctx, iamOS.objAPI, iamConfigPrefix+SlashSeparator) { if item.Err != nil { return nil, item.Err } secondIndex := strings.HasPrefix(item.Item, policyDBPrefix) listKey, trimmedItem := splitPath(item.Item, secondIndex) if listKey == iamFormatFile { continue }
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 26.6K bytes - Click Count (0) -
docs_src/query_params/tutorial004_py310.py
@app.get("/users/{user_id}/items/{item_id}") async def read_user_item( user_id: int, item_id: str, q: str | None = None, short: bool = False ): item = {"item_id": item_id, "owner_id": user_id} if q: item.update({"q": q}) if not short: item.update( {"description": "This is an amazing item that has a long description"} )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 436 bytes - Click Count (0) -
.ci/scripts/packaging-test.ps1
$env:JAVA_TOOL_OPTIONS='' $ErrorActionPreference="Stop" $gradleInit = "C:\Users\$env:username\.gradle\init.d\" echo "Remove $gradleInit" Remove-Item -Recurse -Force $gradleInit -ErrorAction Ignore New-Item -ItemType directory -Path $gradleInit echo "Copy .ci/init.gradle to $gradleInit" Copy-Item .ci/init.gradle -Destination $gradleInit [Environment]::SetEnvironmentVariable("JAVA_HOME", $null, "Machine")
Created: Wed Apr 08 16:19:15 GMT 2026 - Last Modified: Tue Jun 15 22:00:26 GMT 2021 - 1.3K bytes - Click Count (0) -
docs_src/dataclasses_/tutorial002_py310.py
from dataclasses import dataclass, field from fastapi import FastAPI @dataclass class Item: name: str price: float tags: list[str] = field(default_factory=list) description: str | None = None tax: float | None = None app = FastAPI() @app.get("/items/next", response_model=Item) async def read_next_item(): return { "name": "Island In The Moon", "price": 12.99,Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 506 bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/body-multiple-params.md
/// ## 嵌入單一 Body 參數 { #embed-a-single-body-parameter } 假設你只有一個來自 Pydantic 模型 `Item` 的單一 `item` Body 參數。 預設情況下,**FastAPI** 會直接期望該模型的內容作為請求主體。 但如果你想讓它像宣告多個 Body 參數時那樣,期望一個帶有 `item` 鍵、其內含模型內容的 JSON,你可以使用 `Body` 的特殊參數 `embed`: ```Python item: Item = Body(embed=True) ``` 如下: {* ../../docs_src/body_multiple_params/tutorial005_an_py310.py hl[17] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:15:26 GMT 2026 - 4.6K bytes - Click Count (0) -
docs_src/body/tutorial003_py310.py
from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None app = FastAPI() @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 330 bytes - Click Count (0)