Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 51 for jsonable_encoder (0.32 sec)

  1. docs/de/docs/tutorial/testing.md

        Wenn Sie ein Pydantic-Modell in Ihrem Test haben und dessen Daten während des Testens an die Anwendung senden möchten, können Sie den `jsonable_encoder` verwenden, der in [JSON-kompatibler Encoder](encoder.md){.internal-link target=_blank} beschrieben wird.
    
    ## Tests ausführen
    
    Danach müssen Sie nur noch `pytest` installieren:
    
    <div class="termy">
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:20:01 GMT 2024
    - 7K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/testing.md

        Note that the `TestClient` receives data that can be converted to JSON, not Pydantic models.
    
        If you have a Pydantic model in your test and you want to send its data to the application during testing, you can use the `jsonable_encoder` described in [JSON Compatible Encoder](encoder.md){.internal-link target=_blank}.
    
    ## Run it
    
    After that, you just need to install `pytest`:
    
    <div class="termy">
    
    ```console
    $ pip install pytest
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/testing.md

    !!! info
        🗒 👈 `TestClient` 📨 💽 👈 💪 🗜 🎻, 🚫 Pydantic 🏷.
    
        🚥 👆 ✔️ Pydantic 🏷 👆 💯 &amp; 👆 💚 📨 🚮 💽 🈸 ⏮️ 🔬, 👆 💪 ⚙️ `jsonable_encoder` 🔬 [🎻 🔗 🔢](encoder.md){.internal-link target=_blank}.
    
    ## 🏃 ⚫️
    
    ⏮️ 👈, 👆 💪 ❎ `pytest`:
    
    <div class="termy">
    
    ```console
    $ pip install pytest
    
    ---> 100%
    ```
    
    </div>
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  4. docs/ja/docs/tutorial/testing.md

    !!! info "情報"
        `TestClient` は、Pydanticモデルではなく、JSONに変換できるデータを受け取ることに注意してください。
    
        テストにPydanticモデルがあり、テスト中にそのデータをアプリケーションに送信したい場合は、[JSON互換エンコーダ](encoder.md){.internal-link target=_blank} で説明されている `jsonable_encoder` が利用できます。
    
    ## 実行
    
    後は、`pytest` をインストールするだけです:
    
    <div class="termy">
    
    ```console
    $ pip install pytest
    
    ---> 100%
    ```
    
    </div>
    
    ファイルを検知し、自動テストを実行し、結果のレポートを返します。
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 16:16:02 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/testing.md

    !!! info "信息"
        注意 `TestClient` 接收可以被转化为JSON的数据,而不是Pydantic模型。
    
        如果你在测试中有一个Pydantic模型,并且你想在测试时发送它的数据给应用,你可以使用在[JSON Compatible Encoder](encoder.md){.internal-link target=_blank}介绍的`jsonable_encoder` 。
    
    ## 运行起来
    
    之后,你只需要安装 `pytest`:
    
    <div class="termy">
    
    ```console
    $ pip install pytest
    
    ---> 100%
    ```
    
    </div>
    
    他会自动检测文件和测试,执行测试,然后向你报告结果。
    
    执行测试:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/testing.md

        Если в Ваших тестах есть модели Pydantic и Вы хотите отправить их в тестируемое приложение, то можете использовать функцию `jsonable_encoder`, описанную на странице [Кодировщик совместимый с JSON](encoder.md){.internal-link target=_blank}.
    
    ## Запуск тестов
    
    Далее Вам нужно установить `pytest`:
    
    <div class="termy">
    
    ```console
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/custom-response.md

    ```Python hl_lines="2  7"
    {!../../../docs_src/custom_response/tutorial001b.py!}
    ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 23 13:05:12 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/custom-response.md

    But if you are certain that the content that you are returning is **serializable with JSON**, you can pass it directly to the response class and avoid the extra overhead that FastAPI would have by passing your return content through the `jsonable_encoder` before passing it to the response class.
    
    ```Python hl_lines="2  7"
    {!../../../docs_src/custom_response/tutorial001b.py!}
    ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  9. docs/em/docs/advanced/custom-response.md

    ✋️ 🚥 👆 🎯 👈 🎚 👈 👆 🛬 **🎻 ⏮️ 🎻**, 👆 💪 🚶‍♀️ ⚫️ 🔗 📨 🎓 &amp; ❎ ➕ 🌥 👈 FastAPI 🔜 ✔️ 🚶‍♀️ 👆 📨 🎚 🔘 `jsonable_encoder` ⏭ 🚶‍♀️ ⚫️ 📨 🎓.
    
    ```Python hl_lines="2  7"
    {!../../../docs_src/custom_response/tutorial001b.py!}
    ```
    
    !!! info
        🔢 `response_class` 🔜 ⚙️ 🔬 "📻 🆎" 📨.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  10. docs/en/docs/release-notes.md

        * In `encoders.jsonable_encoder`:
            * Remove deprecated `skip_defaults`, use instead `exclude_unset`.
            * Set default of `exclude` from `set()` to `None` (as is in Pydantic).
        * PR [#1862](https://github.com/tiangolo/fastapi/pull/1862).
    * In `encoders.jsonable_encoder` remove parameter `sqlalchemy_safe`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
Back to top