Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 331 - 340 of 543 for item_b (0.06 seconds)

  1. 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 }
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 16 16:33:45 GMT 2025
    - 32K bytes
    - Click Count (0)
  2. 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`
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 11.6K bytes
    - Click Count (0)
  3. docs/en/docs/python-types.md

    ///
    
    That means: "the variable `items` is a `list`, and each of the items in this list is a `str`".
    
    By doing that, your editor can provide support even while processing items from the list:
    
    <img src="/img/python-types/image05.png">
    
    Without types, that's almost impossible to achieve.
    
    Notice that the variable `item` is one of the elements in the list `items`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 15.6K bytes
    - Click Count (0)
  4. fastapi/applications.py

            from pydantic import BaseModel
    
            class Item(BaseModel):
                name: str
                description: str | None = None
    
            app = FastAPI()
    
            @app.put("/items/{item_id}")
            def replace_item(item_id: str, item: Item):
                return {"message": "Item replaced", "id": item_id}
            ```
            """
            return self.router.put(
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 176.3K bytes
    - Click Count (0)
  5. docs_src/security/tutorial004_an_py310.py

    async def read_users_me(
        current_user: Annotated[User, Depends(get_current_active_user)],
    ):
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(
        current_user: Annotated[User, Depends(get_current_active_user)],
    ):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Sep 29 02:57:38 GMT 2025
    - 4.1K bytes
    - Click Count (0)
  6. docs/ja/docs/tutorial/query-params.md

                "type": "value_error.missing"
            }
        ]
    }
    ```
    
    `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.py hl[10] *}
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 5.4K bytes
    - Click Count (0)
  7. docs/de/docs/tutorial/bigger-applications.md

    ## Ein weiteres Modul mit `APIRouter` { #another-module-with-apirouter }
    
    Nehmen wir an, Sie haben im Modul unter `app/routers/items.py` auch die Endpunkte, die für die Verarbeitung von Artikeln („Items“) aus Ihrer Anwendung vorgesehen sind.
    
    Sie haben *Pfadoperationen* für:
    
    * `/items/`
    * `/items/{item_id}`
    
    Es ist alles die gleiche Struktur wie bei `app/routers/users.py`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 10 13:54:34 GMT 2025
    - 21.3K bytes
    - Click Count (0)
  8. docs/ru/docs/tutorial/bigger-applications.md

    ## Ещё один модуль с `APIRouter` { #another-module-with-apirouter }
    
    Давайте также предположим, что у вас есть *эндпоинты*, отвечающие за обработку "items", и они находятся в модуле `app/routers/items.py`.
    
    У вас определены следующие *операции пути* (*эндпоинты*):
    
    * `/items/`
    * `/items/{item_id}`
    
    Тут всё точно также, как и в ситуации с `app/routers/users.py`.
    
    Но теперь мы хотим поступить немного умнее и слегка упростить код.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Thu Dec 11 21:25:03 GMT 2025
    - 30.4K bytes
    - Click Count (0)
  9. docs_src/security/tutorial005_an_py310.py

        current_user: Annotated[User, Depends(get_current_active_user)],
    ):
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(
        current_user: Annotated[User, Security(get_current_active_user, scopes=["items"])],
    ):
        return [{"item_id": "Foo", "owner": current_user.username}]
    
    
    @app.get("/status/")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Sep 29 02:57:38 GMT 2025
    - 5.3K bytes
    - Click Count (0)
  10. docs_src/security/tutorial005_an_py39.py

        current_user: Annotated[User, Depends(get_current_active_user)],
    ):
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(
        current_user: Annotated[User, Security(get_current_active_user, scopes=["items"])],
    ):
        return [{"item_id": "Foo", "owner": current_user.username}]
    
    
    @app.get("/status/")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Sep 29 02:57:38 GMT 2025
    - 5.3K bytes
    - Click Count (0)
Back to Top