Search Options

Results per page
Sort
Preferred Languages
Advance

Results 201 - 210 of 850 for pydantic (0.09 sec)

  1. 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)
  2. docs/em/docs/tutorial/body-fields.md

    # 💪 - 🏑
    
    🎏 🌌 👆 💪 📣 🌖 🔬 & 🗃 *➡ 🛠️ 🔢* 🔢 ⏮️ `Query`, `Path` & `Body`, 👆 💪 📣 🔬 & 🗃 🔘 Pydantic 🏷 ⚙️ Pydantic `Field`.
    
    ## 🗄 `Field`
    
    🥇, 👆 ✔️ 🗄 ⚫️:
    
    //// tab | 🐍 3️⃣.6️⃣ & 🔛
    
    ```Python hl_lines="4"
    {!> ../../docs_src/body_fields/tutorial001.py!}
    ```
    
    ////
    
    //// tab | 🐍 3️⃣.1️⃣0️⃣ & 🔛
    
    ```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)
  3. tests/test_tutorial/test_schema_extra_example/test_tutorial005_an_py39.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/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)
  5. docs/zh/docs/tutorial/body-fields.md

    # 请求体 - 字段
    
    与在*路径操作函数*中使用 `Query`、`Path` 、`Body` 声明校验与元数据的方式一样,可以使用 Pydantic 的 `Field` 在 Pydantic 模型内部声明校验和元数据。
    
    ## 导入 `Field`
    
    首先,从 Pydantic 中导入 `Field`:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="4"
    {!> ../../docs_src/body_fields/tutorial001_an_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="4"
    {!> ../../docs_src/body_fields/tutorial001_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  6. docs/en/docs/project-generation.md

    - ⚡ [**FastAPI**](https://fastapi.tiangolo.com) for the Python backend API.
        - 🧰 [SQLModel](https://sqlmodel.tiangolo.com) for the Python SQL database interactions (ORM).
        - 🔍 [Pydantic](https://docs.pydantic.dev), used by FastAPI, for the data validation and settings management.
        - 💾 [PostgreSQL](https://www.postgresql.org) as the SQL database.
    - 🚀 [React](https://react.dev) for the frontend.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Oct 04 11:16:34 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  7. tests/test_additional_responses_custom_model_in_callback.py

    from dirty_equals import IsDict
    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, HttpUrl
    from starlette.responses import JSONResponse
    
    
    class CustomModel(BaseModel):
        a: int
    
    
    app = FastAPI()
    
    callback_router = APIRouter(default_response_class=JSONResponse)
    
    
    @callback_router.get(
        "{$callback_url}/callback/", responses={400: {"model": CustomModel}}
    )
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  8. docs/en/docs/index.md

    Additional optional Pydantic dependencies:
    
    * <a href="https://docs.pydantic.dev/latest/usage/pydantic_settings/" target="_blank"><code>pydantic-settings</code></a> - for settings management.
    * <a href="https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/" target="_blank"><code>pydantic-extra-types</code></a> - for extra types to be used with Pydantic.
    
    Additional optional FastAPI dependencies:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/query-param-models.md

    Isso permitiria que você **reutilizasse o modelo** em **diversos lugares**, e também declarasse validações e metadados de todos os parâmetros de uma única vez. 😎
    
    /// note | Nota
    
    Isso é suportado desde o FastAPI versão `0.115.0`. 🤓
    
    ///
    
    ## Parâmetros de Consulta com um Modelo Pydantic
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 15 09:53:14 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. docs/es/docs/project-generation.md

    - ⚡ [**FastAPI**](https://fastapi.tiangolo.com) para el backend API en Python.
        - 🧰 [SQLModel](https://sqlmodel.tiangolo.com) para las interacciones con la base de datos SQL en Python (ORM).
        - 🔍 [Pydantic](https://docs.pydantic.dev), utilizado por FastAPI, para la validación de datos y la gestión de configuraciones.
        - 💾 [PostgreSQL](https://www.postgresql.org) como la base de datos SQL.
    - 🚀 [React](https://react.dev) para el frontend.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Oct 04 11:16:34 UTC 2024
    - 2K bytes
    - Viewed (0)
Back to top