Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for is_dataclass (0.18 sec)

  1. fastapi/utils.py

    import re
    import warnings
    from dataclasses import is_dataclass
    from typing import (
        TYPE_CHECKING,
        Any,
        Dict,
        MutableMapping,
        Optional,
        Set,
        Type,
        Union,
        cast,
    )
    from weakref import WeakKeyDictionary
    
    import fastapi
    from fastapi._compat import (
        PYDANTIC_V2,
        BaseConfig,
        ModelField,
        PydanticSchemaGenerationError,
        Undefined,
        UndefinedType,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  2. fastapi/_compat.py

    from collections import deque
    from copy import copy
    from dataclasses import dataclass, is_dataclass
    from enum import Enum
    from typing import (
        Any,
        Callable,
        Deque,
        Dict,
        FrozenSet,
        List,
        Mapping,
        Sequence,
        Set,
        Tuple,
        Type,
        Union,
    )
    
    from fastapi.exceptions import RequestErrorModel
    from fastapi.types import IncEx, ModelNameMap, UnionType
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  3. fastapi/encoders.py

                exclude_defaults=exclude_defaults,
                # TODO: remove when deprecating Pydantic v1
                custom_encoder=encoders,
                sqlalchemy_safe=sqlalchemy_safe,
            )
        if dataclasses.is_dataclass(obj):
            obj_dict = dataclasses.asdict(obj)
            return jsonable_encoder(
                obj_dict,
                include=include,
                exclude=exclude,
                by_alias=by_alias,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  4. fastapi/routing.py

                    exclude_defaults=exclude_defaults,
                    exclude_none=exclude_none,
                )
                for k, v in res.items()
            }
        elif dataclasses.is_dataclass(res):
            return dataclasses.asdict(res)
        return res
    
    
    async def serialize_response(
        *,
        field: Optional[ModelField] = None,
        response_content: Any,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
Back to top