MCPcopy Index your code
hub / github.com/fastapi/sqlmodel / model_dump

Method model_dump

sqlmodel/main.py:890–930  ·  view source on GitHub ↗
(
        self,
        *,
        mode: Literal["json", "python"] | str = "python",
        include: IncEx | None = None,
        exclude: IncEx | None = None,
        context: Any | None = None,  # v2.7
        by_alias: bool | None = None,
        exclude_unset: bool = False,
        exclude_defaults: bool = False,
        exclude_none: bool = False,
        exclude_computed_fields: bool = False,  # v2.12
        round_trip: bool = False,
        warnings: bool | Literal["none", "warn", "error"] = True,
        fallback: Callable[[Any], Any] | None = None,  # v2.11
        serialize_as_any: bool = False,  # v2.7
        polymorphic_serialization: bool | None = None,  # v2.13
    )

Source from the content-addressed store, hash-verified

888 )
889
890 def model_dump(
891 self,
892 *,
893 mode: Literal["json", "python"] | str = "python",
894 include: IncEx | None = None,
895 exclude: IncEx | None = None,
896 context: Any | None = None, # v2.7
897 by_alias: bool | None = None,
898 exclude_unset: bool = False,
899 exclude_defaults: bool = False,
900 exclude_none: bool = False,
901 exclude_computed_fields: bool = False, # v2.12
902 round_trip: bool = False,
903 warnings: bool | Literal["none", "warn", "error"] = True,
904 fallback: Callable[[Any], Any] | None = None, # v2.11
905 serialize_as_any: bool = False, # v2.7
906 polymorphic_serialization: bool | None = None, # v2.13
907 ) -> builtins.dict[str, Any]:
908 if PYDANTIC_MINOR_VERSION < (2, 11):
909 by_alias = by_alias or False
910 extra_kwargs: dict[str, Any] = {}
911 extra_kwargs["context"] = context
912 extra_kwargs["serialize_as_any"] = serialize_as_any
913 if PYDANTIC_MINOR_VERSION >= (2, 11):
914 extra_kwargs["fallback"] = fallback
915 if PYDANTIC_MINOR_VERSION >= (2, 12):
916 extra_kwargs["exclude_computed_fields"] = exclude_computed_fields
917 if PYDANTIC_MINOR_VERSION >= (2, 13):
918 extra_kwargs["polymorphic_serialization"] = polymorphic_serialization
919 return super().model_dump(
920 mode=mode,
921 include=include,
922 exclude=exclude,
923 by_alias=by_alias,
924 exclude_unset=exclude_unset,
925 exclude_defaults=exclude_defaults,
926 exclude_none=exclude_none,
927 round_trip=round_trip,
928 warnings=warnings,
929 **extra_kwargs,
930 )
931
932 @deprecated(
933 """

Callers 15

dictMethod · 0.95
update_heroFunction · 0.80
update_heroFunction · 0.80
update_heroFunction · 0.80
update_heroFunction · 0.80
update_heroFunction · 0.80
update_heroFunction · 0.80
update_teamFunction · 0.80
update_heroFunction · 0.80
update_teamFunction · 0.80

Calls

no outgoing calls