Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for FieldInfo (0.22 sec)

  1. fastapi/_compat.py

        def is_bytes_sequence_field(field: ModelField) -> bool:
            return is_bytes_sequence_annotation(field.type_)
    
        def copy_field_info(*, field_info: FieldInfo, annotation: Any) -> FieldInfo:
            cls = type(field_info)
            merged_field_info = cls.from_annotation(annotation)
            new_field_info = copy(field_info)
            new_field_info.metadata = merged_field_info.metadata
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  2. docs/ko/docs/tutorial/body-fields.md

    !!! note "기술적 세부사항"
        실제로 `Query`, `Path`등, 여러분이 앞으로 볼 다른 것들은 공통 클래스인 `Param` 클래스의 서브클래스 객체를 만드는데, 그 자체로 Pydantic의 `FieldInfo` 클래스의 서브클래스입니다.
    
        그리고 Pydantic의 `Field` 또한 `FieldInfo`의 인스턴스를 반환합니다.
    
        `Body` 또한 `FieldInfo`의 서브클래스 객체를 직접적으로 반환합니다. 그리고 `Body` 클래스의 서브클래스인 것들도 여러분이 나중에 보게될 것입니다.
    
         `Query`, `Path`와 그 외 것들을 `fastapi`에서 임포트할 때, 이는 실제로 특별한 클래스를 반환하는 함수인 것을 기억해 주세요.
    
    !!! tip "팁"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  3. fastapi/utils.py

        field_info: Optional[FieldInfo] = None,
        alias: Optional[str] = None,
        mode: Literal["validation", "serialization"] = "validation",
    ) -> ModelField:
        """
        Create a new response field. Raises if type_ is invalid.
        """
        class_validators = class_validators or {}
        if PYDANTIC_V2:
            field_info = field_info or FieldInfo(
                annotation=type_, default=default, alias=alias
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. fastapi/params.py

    from fastapi.openapi.models import Example
    from pydantic.fields import FieldInfo
    from typing_extensions import Annotated, deprecated
    
    from ._compat import PYDANTIC_V2, PYDANTIC_VERSION, Undefined
    
    _Unset: Any = Undefined
    
    
    class ParamTypes(Enum):
        query = "query"
        header = "header"
        path = "path"
        cookie = "cookie"
    
    
    class Param(FieldInfo):
        in_: ParamTypes
    
        def __init__(
            self,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
Back to top