Search Options

Results per page
Sort
Preferred Languages
Advance

Results 361 - 370 of 378 for item_2 (0.03 sec)

  1. docs/zh/docs/deployment/docker.md

    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: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    ### Dockerfile
    
    现在在相同的project目录创建一个名为`Dockerfile`的文件:
    
    ```{ .dockerfile .annotate }
    # (1)
    FROM python:3.9
    
    # (2)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Aug 12 21:47:53 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  2. docs/de/docs/deployment/docker.md

    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: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    ### Dockerfile { #dockerfile }
    
    Erstellen Sie nun im selben Projektverzeichnis eine Datei `Dockerfile` mit:
    
    ```{ .dockerfile .annotate }
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 02 17:32:56 UTC 2025
    - 33.6K bytes
    - Viewed (0)
  3. docs/ja/docs/python-types.md

    /// tip | 豆知識
    
    角括弧内の内部の型は「型パラメータ」と呼ばれています。
    
    この場合、`str`は`List`に渡される型パラメータです。
    
    ///
    
    つまり: 変数`items`は`list`であり、このリストの各項目は`str`です。
    
    そうすることで、エディタはリストの項目を処理している間にもサポートを提供できます。
    
    <img src="https://fastapi.tiangolo.com/img/python-types/image05.png">
    
    タイプがなければ、それはほぼ不可能です。
    
    変数`item`はリスト`items`の要素の一つであることに注意してください。
    
    それでも、エディタはそれが`str`であることを知っていて、そのためのサポートを提供しています。
    
    #### `Tuple` と `Set`
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  4. docs/es/docs/deployment/docker.md

    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: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    ### Dockerfile { #dockerfile }
    
    Ahora, en el mismo directorio del proyecto, crea un archivo `Dockerfile` con:
    
    ```{ .dockerfile .annotate }
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 32K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial005.py

        client = TestClient(mod.app)
        access_token = get_access_token(scope="me items", client=client)
        response = client.get(
            "/users/me/items/", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo", "owner": "johndoe"}]
    
    
    def test_read_system_status(mod: ModuleType):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  6. fastapi/routing.py

            from pydantic import BaseModel
    
            class Item(BaseModel):
                name: str
                description: str | None = None
    
            app = FastAPI()
            router = APIRouter()
    
            @router.put("/items/{item_id}")
            def replace_item(item_id: str, item: Item):
                return {"message": "Item replaced", "id": item_id}
    
            app.include_router(router)
            ```
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial004.py

        client = TestClient(mod.app)
        access_token = get_access_token(client=client)
        response = client.get(
            "/users/me/items/", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo", "owner": "johndoe"}]
    
    
    def test_openapi_schema(mod: ModuleType):
        client = TestClient(mod.app)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 13.3K bytes
    - Viewed (0)
  8. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/TransformerTest.java

            assertEquals("123", testTransformer.getData(intData));
    
            // List data
            List<String> list = new ArrayList<>();
            list.add("item1");
            list.add("item2");
            TestAccessResultData<String> listData = new TestAccessResultData<>(list.toString().getBytes());
            Object retrievedList = testTransformer.getData(listData);
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Sat Sep 06 04:15:37 UTC 2025
    - 28K bytes
    - Viewed (0)
  9. docs/ru/docs/python-types.md

    ///
    
    Это означает: «переменная `items` — это `list`, и каждый элемент этого списка — `str`».
    
    Таким образом, ваш редактор кода сможет помогать даже при обработке элементов списка:
    
    <img src="/img/python-types/image05.png">
    
    Без типов добиться этого почти невозможно.
    
    Обратите внимание, что переменная `item` — один из элементов списка `items`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 24.4K bytes
    - Viewed (0)
  10. docs/de/docs/python-types.md

    {* ../../docs_src/python_types/tutorial007_py39.py hl[1] *}
    
    Das bedeutet:
    
    * Die Variable `items_t` ist ein `tuple` mit 3 Elementen, einem `int`, einem weiteren `int` und einem `str`.
    * Die Variable `items_s` ist ein `set`, und jedes seiner Elemente ist vom Typ `bytes`.
    
    #### Dict { #dict }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 17.9K bytes
    - Viewed (1)
Back to top