Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 714 for pydantic (0.09 sec)

  1. docs/zh/docs/tutorial/security/get-current-user.md

    `get_current_user` 使用创建的(伪)工具函数,该函数接收 `str` 类型的令牌,并返回 Pydantic 的 `User` 模型:
    
    {* ../../docs_src/security/tutorial002.py hl[19:22,26:27] *}
    
    ## 注入当前用户
    
    在*路径操作* 的 `Depends` 中使用 `get_current_user`:
    
    {* ../../docs_src/security/tutorial002.py hl[31] *}
    
    注意,此处把 `current_user` 的类型声明为 Pydantic 的 `User` 模型。
    
    这有助于在函数内部使用代码补全和类型检查。
    
    /// tip | 提示
    
    还记得请求体也是使用 Pydantic 模型声明的吧。
    
    放心,因为使用了 `Depends`,**FastAPI** 不会搞混。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. fastapi/utils.py

        Validator,
        annotation_is_pydantic_v1,
    )
    from fastapi.datastructures import DefaultPlaceholder, DefaultType
    from fastapi.exceptions import FastAPIDeprecationWarning, PydanticV1NotSupportedError
    from pydantic import BaseModel
    from pydantic.fields import FieldInfo
    from typing_extensions import Literal
    
    from ._compat import v2
    
    if TYPE_CHECKING:  # pragma: nocover
        from .routing import APIRoute
    
    # Cache for `create_cloned_field`
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  3. docs/de/docs/advanced/path-operation-advanced-configuration.md

    Das könnte man mit `openapi_extra` machen:
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial006_py39.py hl[19:36, 39:40] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  4. docs/fr/docs/advanced/path-operation-advanced-configuration.md

    Vous pouvez le faire avec `openapi_extra` :
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial006.py hl[20:37,39:40] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Nov 09 16:39:20 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  5. docs/fr/docs/deployment/versions.md

    ## À propos de Pydantic
    
    Pydantic inclut des tests pour **FastAPI** avec ses propres tests, ainsi les nouvelles versions de Pydantic (au-dessus
    de `1.0.0`) sont toujours compatibles avec **FastAPI**.
    
    Vous pouvez épingler Pydantic à toute version supérieure à `1.0.0` qui fonctionne pour vous et inférieure à `2.0.0`.
    
    Par exemple :
    
    ```txt
    pydantic>=1.2.0,<2.0.0
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Nov 09 16:39:20 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. docs/en/docs/how-to/separate-openapi-schemas.md

    Since **Pydantic v2** was released, the generated OpenAPI is a bit more exact and **correct** than before. 😎
    
    In fact, in some cases, it will even have **two JSON Schemas** in OpenAPI for the same Pydantic model, for input and output, depending on if they have **default values**.
    
    Let's see how that works and how to change it if you need to do that.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  7. docs/fr/docs/features.md

    ## Fonctionnalités de Pydantic
    
    **FastAPI** est totalement compatible avec (et basé sur) <a href="https://docs.pydantic.dev/" class="external-link" target="_blank"><strong>Pydantic</strong></a>. Le code utilisant Pydantic que vous ajouterez fonctionnera donc aussi.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  8. docs/uk/docs/tutorial/body-fields.md

    ## Імпорт `Field`
    
    Спочатку вам потрібно імпортувати це:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *}
    
    /// warning
    
    Зверніть увагу, що `Field` імпортується прямо з `pydantic`, а не з `fastapi`, як всі інші (`Query`, `Path`, `Body` тощо).
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/response-model.md

    ///
    
    `response_model` receives the same type you would declare for a Pydantic model field, so, it can be a Pydantic model, but it can also be, e.g. a `list` of Pydantic models, like `List[Item]`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/cookie-param-models.md

    Diese gleiche Technik gilt für `Query`, `Cookie` und `Header`. 😎
    
    ///
    
    ## Cookies mit einem Pydantic-Modell { #cookies-with-a-pydantic-model }
    
    Deklarieren Sie die **Cookie**-Parameter, die Sie benötigen, in einem **Pydantic-Modell**, und deklarieren Sie dann den Parameter als `Cookie`:
    
    {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 13:54:34 UTC 2025
    - 3.8K bytes
    - Viewed (0)
Back to top