Search Options

Results per page
Sort
Preferred Languages
Advance

Results 191 - 200 of 849 for Pydantic (0.09 sec)

  1. tests/test_tutorial/test_extra_data_types/test_tutorial001_an_py39.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
    - 7K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_schema_extra_example/test_tutorial005_an.py

                                    "schema": IsDict({"$ref": "#/components/schemas/Item"})
                                    | IsDict(
                                        # TODO: remove when deprecating Pydantic v1
                                        {
                                            "allOf": [
                                                {"$ref": "#/components/schemas/Item"}
                                            ],
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 26 18:03:13 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_schema_extra_example/test_tutorial005_py310.py

                                    "schema": IsDict({"$ref": "#/components/schemas/Item"})
                                    | IsDict(
                                        # TODO: remove when deprecating Pydantic v1
                                        {
                                            "allOf": [
                                                {"$ref": "#/components/schemas/Item"}
                                            ],
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 26 18:03:13 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/body-nested-models.md

    Чтобы увидеть все варианты, которые у вас есть, ознакомьтесь с документацией <a href="https://docs.pydantic.dev/latest/concepts/types/" class="external-link" target="_blank">по необычным типам Pydantic</a>. Вы увидите некоторые примеры в следующей главе.
    
    Например, так как в модели `Image` у нас есть поле `url`, то мы можем объявить его как тип `HttpUrl` из модуля Pydantic вместо типа `str`:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="2  8"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/schema-extra-example.md

    # 模式的额外信息 - 例子
    
    您可以在JSON模式中定义额外的信息。
    
    一个常见的用例是添加一个将在文档中显示的`example`。
    
    有几种方法可以声明额外的 JSON 模式信息。
    
    ## Pydantic `schema_extra`
    
    您可以使用 `Config` 和 `schema_extra` 为Pydantic模型声明一个示例,如<a href="https://docs.pydantic.dev/latest/concepts/json_schema/#schema-customization" class="external-link" target="_blank">Pydantic 文档:定制 Schema </a>中所述:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="13-21"
    {!> ../../docs_src/schema_extra_example/tutorial001_py310.py!}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an.py

                        "msg": "Field required",
                        "input": None,
                    },
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
                "detail": [
                    {
                        "loc": ["body", "file"],
                        "msg": "field required",
                        "type": "value_error.missing",
                    },
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  7. tests/test_union_body.py

    from typing import Optional, Union
    
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Optional[str] = None
    
    
    class OtherItem(BaseModel):
        price: int
    
    
    @app.post("/items/")
    def save_union_body(item: Union[OtherItem, Item]):
        return {"item": item}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  8. docs/pt/docs/python-types.md

    /// info | Informação
    
    Para saber mais sobre o <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic, verifique a sua documentação</a>.
    
    ///
    
    O **FastAPI** é todo baseado em Pydantic.
    
    Você verá muito mais disso na prática no [Tutorial - Guia do usuário](tutorial/index.md){.internal-link target=_blank}.
    
    /// tip | Dica
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 15 12:32:27 UTC 2024
    - 18K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/sql-databases.md

    A classe `Hero` é muito semelhante a um modelo Pydantic (na verdade, por baixo dos panos, ela *é um modelo Pydantic*).
    
    Existem algumas diferenças:
    
    * `table=True` informa ao SQLModel que este é um *modelo de tabela*, ele deve representar uma **tabela** no banco de dados SQL, não é apenas um *modelo de dados* (como seria qualquer outra classe Pydantic comum).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 15:25:29 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/body-fields.md

    # 💪 - 🏑
    
    🎏 🌌 👆 💪 📣 🌖 🔬 &amp; 🗃 *➡ 🛠️ 🔢* 🔢 ⏮️ `Query`, `Path` &amp; `Body`, 👆 💪 📣 🔬 &amp; 🗃 🔘 Pydantic 🏷 ⚙️ Pydantic `Field`.
    
    ## 🗄 `Field`
    
    🥇, 👆 ✔️ 🗄 ⚫️:
    
    //// tab | 🐍 3️⃣.6️⃣ &amp; 🔛
    
    ```Python hl_lines="4"
    {!> ../../docs_src/body_fields/tutorial001.py!}
    ```
    
    ////
    
    //// tab | 🐍 3️⃣.1️⃣0️⃣ &amp; 🔛
    
    ```Python hl_lines="2"
    {!> ../../docs_src/body_fields/tutorial001_py310.py!}
    ```
    
    ////
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top