codekingpro/portable-devtools
114k
1from collections.abc import Callable
2from typing import Any
3
4__version__: str
5
6def packb(
7 obj: Any,
8 /,
9 default: Callable[[Any], Any] | None = ...,
10 option: int | None = None,
11) -> bytes: ...
12def unpackb(
13 obj: bytes | bytearray | memoryview,
14 /,
15 *,
16 ext_hook: Callable[[int, bytes], Any] | None = ...,
17 option: int | None = ...,
18) -> Any: ...
19
20class MsgpackDecodeError(ValueError): ...
21class MsgpackEncodeError(TypeError): ...
22
23class Ext:
24 def __init__(self, tag: int, data: bytes) -> None: ...
25
26OPT_DATETIME_AS_TIMESTAMP_EXT: int
27OPT_NAIVE_UTC: int
28OPT_OMIT_MICROSECONDS: int
29OPT_PASSTHROUGH_BIG_INT: int
30OPT_PASSTHROUGH_DATACLASS: int
31OPT_PASSTHROUGH_DATETIME: int
32OPT_PASSTHROUGH_ENUM: int
33OPT_PASSTHROUGH_SUBCLASS: int
34OPT_PASSTHROUGH_TUPLE: int
35OPT_PASSTHROUGH_UUID: int
36OPT_REPLACE_SURROGATES: int
37OPT_SERIALIZE_NUMPY: int
38OPT_SERIALIZE_PYDANTIC: int
39OPT_NON_STR_KEYS: int
40OPT_SORT_KEYS: int
41OPT_UTC_Z: int
42 