- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 849 for Pydantic (0.76 sec)
-
docs/ru/docs/tutorial/encoder.md
Точно так же эта база данных не может принять Pydantic модель (объект с атрибутами), а только `dict`. Для этого можно использовать функцию `jsonable_encoder`. Она принимает объект, например, модель Pydantic, и возвращает его версию, совместимую с JSON: //// tab | Python 3.10+ ```Python hl_lines="4 21"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.8K bytes - Viewed (0) -
docs/ru/docs/tutorial/extra-data-types.md
* `Decimal`: * Встроенный в Python `Decimal`. * В запросах и ответах обрабатывается так же, как и `float`. * Вы можете проверить все допустимые типы данных pydantic здесь: <a href="https://docs.pydantic.dev/latest/concepts/types/" class="external-link" target="_blank">Типы данных Pydantic</a>. ## Пример Вот пример *операции пути* с параметрами, который демонстрирует некоторые из вышеперечисленных типов. //// tab | Python 3.8 и выше
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.7K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 5.8K bytes - Viewed (0) -
tests/test_tutorial/test_extra_data_types/test_tutorial001.py
} ) | IsDict( # TODO: remove when deprecating Pydantic v1 { "$ref": "#/components/schemas/Body_read_items_items__item_id__put" } )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 6.8K bytes - Viewed (0) -
docs/ja/docs/tutorial/schema-extra-example.md
一般的なユースケースはこのドキュメントで示されているように`example`を追加することです。 JSON Schemaの追加情報を宣言する方法はいくつかあります。 ## Pydanticの`schema_extra` <a href="https://docs.pydantic.dev/latest/concepts/json_schema/#schema-customization" class="external-link" target="_blank">Pydanticのドキュメント: スキーマのカスタマイズ</a>で説明されているように、`Config`と`schema_extra`を使ってPydanticモデルの例を宣言することができます: ```Python hl_lines="15 16 17 18 19 20 21 22 23"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3K bytes - Viewed (0) -
tests/test_tuples.py
from typing import List, Tuple from dirty_equals import IsDict from fastapi import FastAPI, Form from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class ItemGroup(BaseModel): items: List[Tuple[str, str]] class Coordinate(BaseModel): x: float y: float @app.post("/model-with-tuple/") def post_model_with_tuple(item_group: ItemGroup): return item_group
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 11.8K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial004_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7.1K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial004_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7.1K bytes - Viewed (0) -
docs/pt/docs/tutorial/extra-data-types.md
* O `Decimal` padrão do Python. * Em requisições e respostas será representado como um `float`. * Você pode checar todos os tipos de dados válidos do Pydantic aqui: <a href="https://docs.pydantic.dev/latest/concepts/types/" class="external-link" target="_blank">Tipos de dados do Pydantic</a>. ## Exemplo Aqui está um exemplo de *operação de rota* com parâmetros utilizando-se de alguns dos tipos acima. ```Python hl_lines="1 3 12-16"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.9K bytes - Viewed (0) -
docs/en/docs/tutorial/header-param-models.md
If you have a group of related **header parameters**, you can create a **Pydantic model** to declare them. This would allow you to **re-use the model** in **multiple places** and also to declare validations and metadata for all the parameters at once. 😎 /// note This is supported since FastAPI version `0.115.0`. 🤓 /// ## Header Parameters with a Pydantic Model
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.5K bytes - Viewed (0)