Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 268 for item (6.16 sec)

  1. docs/fr/docs/advanced/additional-responses.md

                        "message": {
                            "title": "Message",
                            "type": "string"
                        }
                    }
                },
                "Item": {
                    "title": "Item",
                    "required": [
                        "id",
                        "value"
                    ],
                    "type": "object",
                    "properties": {
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  2. docs/bn/docs/index.md

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: Union[bool, None] = None
    
    
    @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}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 30.2K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/query-params-str-validations.md

    {!../../../docs_src/query_params_str_validations/tutorial008.py!}
    ```
    
    ## エイリアスパラメータ
    
    パラメータに`item-query`を指定するとします.
    
    以下のような感じです:
    
    ```
    http://127.0.0.1:8000/items/?item-query=foobaritems
    ```
    
    しかし、`item-query`は有効なPythonの変数名ではありません。
    
    最も近いのは`item_query`でしょう。
    
    しかし、どうしても`item-query`と正確に一致している必要があるとします...
    
    それならば、`alias`を宣言することができます。エイリアスはパラメータの値を見つけるのに使用されます:
    
    ```Python hl_lines="9"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 10.5K bytes
    - Viewed (1)
  4. docs/fr/docs/external-links.md

    {% for section_name, section_content in external_links.items() %}
    
    ## {{ section_name }}
    
    {% for lang_name, lang_content in section_content.items() %}
    
    ### {{ lang_name }}
    
    {% for item in lang_content %}
    
    * <a href="{{ item.link }}" class="external-link" target="_blank">{{ item.title }}</a> by <a href="{{ item.author_link }}" class="external-link" target="_blank">{{ item.author }}</a>.
    
    {% endfor %}
    {% endfor %}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Oct 22 07:35:13 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  5. docs/em/docs/external-links.md

    ## 📄
    
    {% for section_name, section_content in external_links.items() %}
    
    ## {{ section_name }}
    
    {% for lang_name, lang_content in section_content.items() %}
    
    ### {{ lang_name }}
    
    {% for item in lang_content %}
    
    * <a href="{{ item.link }}" class="external-link" target="_blank">{{ item.title }}</a> by <a href="{{ item.author_link }}" class="external-link" target="_blank">{{ item.author }}</a>.
    
    {% endfor %}
    {% endfor %}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Oct 22 07:35:13 GMT 2023
    - 929 bytes
    - Viewed (0)
  6. docs/zh/docs/advanced/response-directly.md

        出于方便,**FastAPI** 会提供与 `starlette.responses` 相同的 `fastapi.responses` 给开发者。但是大多数可用的响应都直接来自 Starlette。
    
    ## 返回自定义 `Response`
    
    上面的例子展示了需要的所有部分,但还不够实用,因为你本可以只是直接返回 `item`,而**FastAPI** 默认帮你把这个 `item` 放到 `JSONResponse` 中,又默认将其转换成了 `dict`等等。
    
    现在,让我们看看你如何才能返回一个自定义的响应。
    
    假设你想要返回一个 <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">XML</a> 响应。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  7. docs/pt/docs/advanced/templates.md

    ## Escrevendo Templates
    
    Então você pode escrever um template em `templates/item.html`, por exemplo:
    
    ```jinja hl_lines="7"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    ### Interpolação de Valores no Template
    
    No código HTML que contém:
    
    {% raw %}
    
    ```jinja
    Item ID: {{ id }}
    ```
    
    {% endraw %}
    
    ...aparecerá o `id` obtido do "context" `dict` que você passou:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 28 04:05:17 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/query-params-str-validations.md

        {!> ../../../docs_src/query_params_str_validations/tutorial008_py310.py!}
        ```
    
    ## 📛 🔢
    
    🌈 👈 👆 💚 🔢 `item-query`.
    
    💖:
    
    ```
    http://127.0.0.1:8000/items/?item-query=foobaritems
    ```
    
    ✋️ `item-query` 🚫 ☑ 🐍 🔢 📛.
    
    🔐 🔜 `item_query`.
    
    ✋️ 👆 💪 ⚫️ ⚫️❔ `item-query`...
    
    ⤴️ 👆 💪 📣 `alias`, &amp; 👈 📛 ⚫️❔ 🔜 ⚙️ 🔎 🔢 💲:
    
    === "🐍 3️⃣.6️⃣ &amp; 🔛"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  9. docs/ja/docs/tutorial/body-multiple-params.md

    
    ## 単一のボディパラメータの埋め込み
    
    Pydanticモデル`Item`のボディパラメータ`item`を1つだけ持っているとしましょう。
    
    デフォルトでは、**FastAPI**はそのボディを直接期待します。
    
    しかし、追加のボディパラメータを宣言したときのように、キー `item` を持つ JSON とその中のモデルの内容を期待したい場合は、特別な `Body` パラメータ `embed` を使うことができます:
    
    ```Python
    item: Item = Body(..., embed=True)
    ```
    
    以下において:
    
    ```Python hl_lines="17"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 15 15:48:41 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/body-multiple-params.md

        `Body` ✔️ 🌐 🎏 ➕ 🔬 &amp; 🗃 🔢 `Query`,`Path` &amp; 🎏 👆 🔜 👀 ⏪.
    
    ## ⏯ 👁 💪 🔢
    
    ➡️ 💬 👆 🕴 ✔️ 👁 `item` 💪 🔢 ⚪️➡️ Pydantic 🏷 `Item`.
    
    🔢, **FastAPI** 🔜 ⤴️ ⌛ 🚮 💪 🔗.
    
    ✋️ 🚥 👆 💚 ⚫️ ⌛ 🎻 ⏮️ 🔑 `item` &amp; 🔘 ⚫️ 🏷 🎚, ⚫️ 🔨 🕐❔ 👆 📣 ➕ 💪 🔢, 👆 💪 ⚙️ 🎁 `Body` 🔢 `embed`:
    
    ```Python
    item: Item = Body(embed=True)
    ```
    
    :
    
    === "🐍 3️⃣.6️⃣ &amp; 🔛"
    
        ```Python hl_lines="17"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 5K bytes
    - Viewed (0)
Back to top