Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ JSON Schema

.. _inspect-api:

Converters
----------

.. currentmodule:: msgspec

.. autofunction:: to_builtins

Inspect
-------

Expand Down
1 change: 1 addition & 0 deletions msgspec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
defstruct,
Raw,
Meta,
to_builtins,
MsgspecError,
EncodeError,
DecodeError,
Expand Down
8 changes: 8 additions & 0 deletions msgspec/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ class Meta:
extra: Final[Union[dict, None]]
def __rich_repr__(self) -> Iterable[Tuple[str, Any]]: ...

def to_builtins(
obj: Any,
*,
str_keys: bool = False,
passthrough: Union[Iterable[Type], None] = None,
enc_hook: Optional[Callable[[Any], Any]] = None,
) -> Any: ...

class MsgspecError(Exception): ...
class EncodeError(MsgspecError): ...
class DecodeError(MsgspecError): ...
Expand Down
Loading