MCPcopy Create free account
hub / github.com/ccxt/ccxt / pack

Method pack

python/ccxt/static_dependencies/msgpack/fallback.py:822–831  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

820 raise TypeError(f"Cannot serialize {obj!r}")
821
822 def pack(self, obj):
823 try:
824 self._pack(obj)
825 except:
826 self._buffer = StringIO() # force reset
827 raise
828 if self._autoreset:
829 ret = self._buffer.getvalue()
830 self._buffer = StringIO()
831 return ret
832
833 def pack_map_pairs(self, pairs):
834 self._pack_map_pairs(len(pairs), pairs)

Callers 9

packFunction · 0.95
to_bytesMethod · 0.80
packbFunction · 0.80
_packMethod · 0.80
pack_ext_typeMethod · 0.80
_pack_array_headerMethod · 0.80
_pack_map_headerMethod · 0.80
_pack_raw_headerMethod · 0.80
_pack_bin_headerMethod · 0.80

Calls 3

_packMethod · 0.95
StringIOClass · 0.85
getvalueMethod · 0.80

Tested by

no test coverage detected