Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 844 for pydantic (0.04 seconds)

  1. docs/en/docs/tutorial/cookie-param-models.md

    ///
    
    ## Cookies with a Pydantic Model { #cookies-with-a-pydantic-model }
    
    Declare the **cookie** parameters that you need in a **Pydantic model**, and then declare the parameter as `Cookie`:
    
    {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *}
    
    **FastAPI** will **extract** the data for **each field** from the **cookies** received in the request and give you the Pydantic model you defined.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 10 11:48:27 GMT 2026
    - 3.1K bytes
    - Click Count (0)
  2. docs/zh-hant/docs/advanced/settings.md

    ## Pydantic `Settings` { #pydantic-settings }
    
    幸好,Pydantic 提供了很好的工具,可用來處理由環境變數而來的設定:[Pydantic:設定管理](https://docs.pydantic.dev/latest/concepts/pydantic_settings/)。
    
    ### 安裝 `pydantic-settings` { #install-pydantic-settings }
    
    首先,請先建立你的[虛擬環境](../virtual-environments.md),啟用它,然後安裝 `pydantic-settings` 套件:
    
    <div class="termy">
    
    ```console
    $ pip install pydantic-settings
    ---> 100%
    ```
    
    </div>
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  3. fastapi/_compat/shared.py

        TypeGuard,
        TypeVar,
        Union,
        get_args,
        get_origin,
    )
    
    from fastapi.types import UnionType
    from pydantic import BaseModel
    from pydantic.version import VERSION as PYDANTIC_VERSION
    from starlette.datastructures import UploadFile
    
    _T = TypeVar("_T")
    
    # Copy from Pydantic: pydantic/_internal/_typing_extra.py
    WithArgsTypes: tuple[Any, ...] = (
        typing._GenericAlias,  # type: ignore[attr-defined]
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:32:12 GMT 2026
    - 6.9K bytes
    - Click Count (0)
  4. docs/zh/docs/tutorial/header-param-models.md

    # Header 参数模型 { #header-parameter-models }
    
    如果您有一组相关的 **header 参数**,您可以创建一个 **Pydantic 模型**来声明它们。
    
    这将允许您在**多个地方**能够**重用模型**,并且可以一次性声明所有参数的验证和元数据。😎
    
    /// note | 注意
    
    自 FastAPI 版本 `0.115.0` 起支持此功能。🤓
    
    ///
    
    ## 使用 Pydantic 模型的 Header 参数 { #header-parameters-with-a-pydantic-model }
    
    在 **Pydantic 模型**中声明所需的 **header 参数**,然后将参数声明为 `Header` :
    
    {* ../../docs_src/header_param_models/tutorial001_an_py310.py hl[9:14,18] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:39:41 GMT 2026
    - 2.5K bytes
    - Click Count (0)
  5. docs/ko/docs/features.md

    * 100% test coverage.
    * 100% type annotated codebase.
    
    ## Pydantic 기능 { #pydantic-features }
    
    **FastAPI**는 [**Pydantic**](https://docs.pydantic.dev/)과 완벽하게 호환되며(또한 이를 기반으로 합니다). 따라서 추가로 가지고 있는 Pydantic 코드도 모두 동작합니다.
    
    데이터베이스를 위한 <abbr title="Object-Relational Mapper - 객체-관계 매퍼">ORM</abbr>, <abbr title="Object-Document Mapper - 객체-문서 매퍼">ODM</abbr>과 같은, Pydantic을 기반으로 하는 외부 라이브러리도 포함합니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 11K bytes
    - Click Count (0)
  6. docs/en/docs/tutorial/header-param-models.md

    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 { #header-parameters-with-a-pydantic-model }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Aug 31 09:15:41 GMT 2025
    - 2.6K bytes
    - Click Count (0)
  7. fastapi/_compat/v2.py

    from fastapi.types import IncEx, ModelNameMap, UnionType
    from pydantic import BaseModel, ConfigDict, Field, TypeAdapter, create_model
    from pydantic import PydanticSchemaGenerationError as PydanticSchemaGenerationError
    from pydantic import PydanticUndefinedAnnotation as PydanticUndefinedAnnotation
    from pydantic import ValidationError as ValidationError
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 16.7K bytes
    - Click Count (0)
  8. docs/zh/docs/advanced/settings.md

    这意味着,在 Python 中从环境变量读取的任何值都是 `str` 类型,任何到不同类型的转换或任何验证都必须在代码中完成。
    
    ## Pydantic 的 `Settings` { #pydantic-settings }
    
    幸运的是,Pydantic 提供了一个很好的工具来处理来自环境变量的这些设置:[Pydantic:Settings 管理](https://docs.pydantic.dev/latest/concepts/pydantic_settings/)。
    
    ### 安装 `pydantic-settings` { #install-pydantic-settings }
    
    首先,确保你创建并激活了[虚拟环境](../virtual-environments.md),然后安装 `pydantic-settings` 包:
    
    <div class="termy">
    
    ```console
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 10.4K bytes
    - Click Count (0)
  9. docs/zh/docs/tutorial/request-form-models.md

    你可以在 FastAPI 中使用 **Pydantic 模型**声明**表单字段**。
    
    /// info | 信息
    
    要使用表单,首先安装 [`python-multipart`](https://github.com/Kludex/python-multipart)。
    
    确保你创建一个[虚拟环境](../virtual-environments.md),激活它,然后再安装,例如:
    
    ```console
    $ pip install python-multipart
    ```
    
    ///
    
    /// note | 注意
    
    自 FastAPI 版本 `0.113.0` 起支持此功能。🤓
    
    ///
    
    ## 表单的 Pydantic 模型 { #pydantic-models-for-forms }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 2.1K bytes
    - Click Count (0)
  10. .github/DISCUSSION_TEMPLATE/questions.yml

            ```
        validations:
          required: true
      - type: input
        id: pydantic-version
        attributes:
          label: Pydantic Version
          description: |
            What Pydantic version are you using?
    
            You can find the Pydantic version with:
    
            ```bash
            python -c "import pydantic; print(pydantic.version.VERSION)"
            ```
        validations:
          required: true
      - type: input
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Aug 03 15:59:41 GMT 2023
    - 5.8K bytes
    - Click Count (0)
Back to Top