Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 271 - 280 of 445 for item_1 (0.06 seconds)

  1. docs/ja/docs/python-types.md

    /// info | 情報
    
    角括弧内の内部の型は「型パラメータ」と呼ばれています。
    
    この場合、`str` は `list` に渡される型パラメータです。
    
    ///
    
    つまり: 変数 `items` は `list` であり、このリストの各項目は `str` です。
    
    そうすることで、エディタはリストの項目を処理している間にもサポートを提供できます。
    
    <img src="/img/python-types/image05.png">
    
    型がなければ、それはほぼ不可能です。
    
    変数 `item` はリスト `items` の要素の一つであることに注意してください。
    
    それでも、エディタはそれが `str` であることを知っていて、そのためのサポートを提供しています。
    
    #### Tuple と Set { #tuple-and-set }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 14.3K bytes
    - Click Count (0)
  2. docs/en/docs/tutorial/path-params-numeric-validations.md

    ///
    
    ## Declare metadata { #declare-metadata }
    
    You can declare all the same parameters as for `Query`.
    
    For example, to declare a `title` metadata value for the path parameter `item_id` you can type:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[10] *}
    
    /// note
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 6.1K bytes
    - Click Count (0)
  3. tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py

        return {"message": "Admin Access"}
    
    
    router = APIRouter(dependencies=[Security(oauth2_scheme, scopes=["read"])])
    
    
    @router.get("/items/")
    async def read_items(token: str | None = Depends(oauth2_scheme)):
        return {"token": token}
    
    
    @router.post("/items/")
    async def create_item(
        token: str | None = Security(oauth2_scheme, scopes=["read", "write"]),
    ):
        return {"token": token}
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 6.6K bytes
    - Click Count (0)
  4. docs/zh/docs/tutorial/bigger-applications.md

    ///
    
    ## 其他使用 `APIRouter` 的模块 { #another-module-with-apirouter }
    
    假设你在位于 `app/routers/items.py` 的模块中还有专门用于处理应用程序中「项目」的端点。
    
    你具有以下*路径操作*:
    
    * `/items/`
    * `/items/{item_id}`
    
    这和 `app/routers/users.py` 的结构完全相同。
    
    但是我们想变得更聪明并简化一些代码。
    
    我们知道此模块中的所有*路径操作*都有相同的:
    
    * 路径 `prefix`:`/items`。
    * `tags`:(仅有一个 `items` 标签)。
    * 额外的 `responses`。
    * `dependencies`:它们都需要我们创建的 `X-Token` 依赖项。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 19.5K bytes
    - Click Count (0)
  5. docs/zh-hant/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md

    ```
    
    在某些情況下,你甚至可以在同一個 FastAPI 路徑操作(path operation)中同時使用 Pydantic v1 與 v2 模型:
    
    {* ../../docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py hl[2:3,6,12,21:22] *}
    
    在上面的範例中,輸入模型是 Pydantic v1,輸出模型(於 `response_model=ItemV2` 定義)是 Pydantic v2。
    
    ### Pydantic v1 參數 { #pydantic-v1-parameters }
    
    若你需要在 Pydantic v1 模型上使用 FastAPI 的參數工具(例如 `Body`、`Query`、`Form` 等),在完成遷移到 Pydantic v2 之前,可以從 `fastapi.temp_pydantic_v1_params` 匯入:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  6. tests/test_invalid_sequence_param.py

        ):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: tuple[Item, Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    def test_invalid_dict():
        with pytest.raises(
            AssertionError,
            match="Query parameter 'q' must be one of the supported types",
        ):
    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)
  7. docs/zh-hant/docs/deployment/docker.md

    ```Python
    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: str | None = None):
        return {"item_id": item_id, "q": q}
    ```
    
    ### Dockerfile { #dockerfile }
    
    現在在同一個專案目錄建立一個 `Dockerfile` 檔案,內容如下:
    
    ```{ .dockerfile .annotate }
    # (1)!
    FROM python:3.14
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 24.9K bytes
    - Click Count (0)
  8. src/test/java/org/codelibs/fess/api/chat/ChatApiManagerTest.java

            final List<String> items = List.of("item1", "item2", "item3");
            chatApiManager.sendSseEvent(writer, "test", Map.of("items", items));
    
            final String output = stringWriter.toString();
            assertTrue(output.contains("event: test"));
            assertTrue(output.contains("["));
            assertTrue(output.contains("item1"));
            assertTrue(output.contains("item2"));
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Mar 14 01:39:16 GMT 2026
    - 35K bytes
    - Click Count (0)
  9. src/main/java/org/codelibs/fess/app/service/CharMappingService.java

         * the item's current state.
         * </p>
         *
         * @param dictId the dictionary ID to store the character mapping item in
         * @param charMappingItem the character mapping item to store
         */
        public void store(final String dictId, final CharMappingItem charMappingItem) {
            getCharMappingFile(dictId).ifPresent(file -> {
                if (charMappingItem.getId() == 0) {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Aug 07 03:06:29 GMT 2025
    - 6.1K bytes
    - Click Count (0)
  10. docs_src/extra_models/tutorial004_py310.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str
    
    
    items = [
        {"name": "Foo", "description": "There comes my hero"},
        {"name": "Red", "description": "It's my aeroplane"},
    ]
    
    
    @app.get("/items/", response_model=list[Item])
    async def read_items():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 356 bytes
    - Click Count (0)
Back to Top