Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 3 of 3 for is_pydantic_v1_model_instance (0.16 seconds)

  1. fastapi/_compat/__init__.py

    from .shared import (
        is_bytes_or_nonable_bytes_annotation as is_bytes_or_nonable_bytes_annotation,
    )
    from .shared import is_bytes_sequence_annotation as is_bytes_sequence_annotation
    from .shared import is_pydantic_v1_model_instance as is_pydantic_v1_model_instance
    from .shared import (
        is_uploadfile_or_nonable_uploadfile_annotation as is_uploadfile_or_nonable_uploadfile_annotation,
    )
    from .shared import (
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 2.1K bytes
    - Click Count (0)
  2. fastapi/_compat/shared.py

        return field_annotation_is_sequence(annotation) and all(
            is_uploadfile_or_nonable_uploadfile_annotation(sub_annotation)
            for sub_annotation in get_args(annotation)
        )
    
    
    def is_pydantic_v1_model_instance(obj: Any) -> bool:
        # TODO: remove this function once the required version of Pydantic fully
        # removes pydantic.v1
        try:
            with warnings.catch_warnings():
    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)
  3. fastapi/encoders.py

    from pydantic.networks import AnyUrl, NameEmail
    from pydantic.types import SecretBytes, SecretStr
    from pydantic_core import PydanticUndefinedType
    
    from ._compat import (
        Url,
        is_pydantic_v1_model_instance,
    )
    
    
    # Taken from Pydantic v1 as is
    def isoformat(o: datetime.date | datetime.time) -> str:
        return o.isoformat()
    
    
    # Adapted from Pydantic v1
    # TODO: pv2 should this return strings instead?
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 10.9K bytes
    - Click Count (0)
Back to Top