Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for body (0.17 sec)

  1. docs/es/docs/index.md

    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
    
    ## Mejora al ejemplo
    
    Ahora modifica el archivo `main.py` para recibir un <abbr title="cuerpo del mensaje HTTP">body</abbr> del `PUT` request.
    
    Declara el body usando las declaraciones de tipo estándares de Python gracias a Pydantic.
    
    ```Python hl_lines="2  7-10  23-25"
    from fastapi import FastAPI
    from pydantic import BaseModel
    from typing import Union
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19K bytes
    - Viewed (0)
  2. docs/hu/docs/index.md

    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
    
    ## Példa frissítése
    
    Módosítsuk a `main.py` fájlt, hogy `PUT` kérések esetén tudjon body-t fogadni.
    
    Deklaráld a body-t standard Python típusokkal, a Pydantic-nak köszönhetően.
    
    ```Python hl_lines="4  9-12  25-27"
    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 20.2K bytes
    - Viewed (0)
  3. docs/fr/docs/index.md

        * Puisque le paramètre `q` est déclaré avec `= None`, il est facultatif.
        * Sans le `None`, il serait nécessaire (comme l'est <abbr title="en anglais : body">le corps</abbr> de la requête dans le cas du `PUT`).
    * Pour les requêtes `PUT` vers `/items/{item_id}`, de lire <abbr title="en anglais : body">le corps</abbr>  en <abbr title="JavaScript Object Notation">JSON</abbr> :
        * Vérifier qu'il a un attribut obligatoire `name` qui devrait être un `str`.
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/dependencies/index.md

        {!> ../../../docs_src/dependencies/tutorial001.py!}
        ```
    
    ### Deklarieren der Abhängigkeit im <abbr title="Das Abhängige, der Verwender der Abhängigkeit">„Dependant“</abbr>
    
    So wie auch `Body`, `Query`, usw., verwenden Sie `Depends` mit den Parametern Ihrer *Pfadoperation-Funktion*:
    
    === "Python 3.10+"
    
        ```Python hl_lines="13  18"
        {!> ../../../docs_src/dependencies/tutorial001_an_py310.py!}
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:01:10 GMT 2024
    - 13.1K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/dependencies/index.md

    ```Python hl_lines="3"
    {!../../../docs_src/dependencies/tutorial001.py!}
    ```
    
    ### "dependant"での依存関係の宣言
    
    *path operation関数*のパラメータに`Body`や`Query`などを使用するのと同じように、新しいパラメータに`Depends`を使用することができます:
    
    ```Python hl_lines="13  18"
    {!../../../docs_src/dependencies/tutorial001.py!}
    ```
    
    関数のパラメータに`Depends`を使用するのは`Body`や`Query`などと同じですが、`Depends`の動作は少し異なります。
    
    `Depends`は1つのパラメータしか与えられません。
    
    このパラメータは関数のようなものである必要があります。
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Jan 15 16:08:16 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/dependencies/index.md

        ```Python hl_lines="3"
        {!> ../../../docs_src/dependencies/tutorial001.py!}
        ```
    
    ### Объявите зависимость в "зависимом"
    
    Точно так же, как вы использовали `Body`, `Query` и т.д. с вашей *функцией обработки пути* для параметров, используйте `Depends` с новым параметром:
    
    === "Python 3.10+"
    
        ```Python hl_lines="13  18"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  7. docs/tr/docs/index.md

    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
    
    ## Örneği Güncelleyelim
    
    Şimdi `main.py` dosyasını, `PUT` isteğiyle birlikte bir gövde alacak şekilde değiştirelim.
    
    <abbr title="Gövde: Body">Gövde</abbr>yi Pydantic sayesinde standart python tiplerini kullanarak tanımlayalım.
    
    ```Python hl_lines="4  9-12  25-27"
    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 22K bytes
    - Viewed (0)
  8. docs/zh-hant/docs/index.md

        - 如果驗證失敗,將會返回清楚有用的錯誤訊息。
    - 查看 `GET` 請求中是否有命名為 `q` 的查詢參數 (例如 `http://127.0.0.1:8000/items/foo?q=somequery`)。
        - 因為 `q` 參數被宣告為 `= None`,所以是選填的。
        - 如果沒有宣告 `None`,則此參數將會是必填 (例如 `PUT` 範例的請求 body)。
    - 對於 `PUT` 的請求 `/items/{item_id}`,將會讀取 body 為 JSON:
        - 驗證是否有必填屬性 `name` 且型別是 `str`。
        - 驗證是否有必填屬性 `price` 且型別是 `float`。
        - 驗證是否有選填屬性 `is_offer` 且型別是 `bool`。
        - 以上驗證都適用於多層次巢狀 JSON 物件。
    - 自動轉換 JSON 格式。
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 18.8K bytes
    - Viewed (0)
  9. docs/en/docs/index.md

    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
    
    ## Example upgrade
    
    Now modify the file `main.py` to receive a body from a `PUT` request.
    
    Declare the body using standard Python types, thanks to Pydantic.
    
    ```Python hl_lines="4  9-12  25-27"
    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  10. docs/de/docs/index.md

    ## Beispiel Aktualisierung
    
    Ändern Sie jetzt die Datei `main.py`, um den <abbr title="Body – Körper, Inhalt: Der eigentliche Inhalt einer Nachricht, nicht die Metadaten">Body</abbr> einer `PUT`-Anfrage zu empfangen.
    
    Deklarieren Sie den Body mithilfe von Standard-Python-Typen, dank Pydantic.
    
    ```Python hl_lines="4  9-12  25-27"
    from typing import Union
    
    from fastapi import FastAPI
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:28:17 GMT 2024
    - 21.2K bytes
    - Viewed (0)
Back to top