MCPcopy Create free account
hub / github.com/cdgriffith/Box / to_msgpack

Method to_msgpack

box/box.py:1537–1545  ·  view source on GitHub ↗

Transform the Box object into a msgpack string. :param filename: File to write msgpack object too :param kwargs: parameters to pass to `msgpack.pack` :return: bytes of msgpack (if no filename provided)

(self, filename: str | PathLike | None = None, **kwargs)

Source from the content-addressed store, hash-verified

1535 if msgpack_available:
1536
1537 def to_msgpack(self, filename: str | PathLike | None = None, **kwargs):
1538 """
1539 Transform the Box object into a msgpack string.
1540
1541 :param filename: File to write msgpack object too
1542 :param kwargs: parameters to pass to `msgpack.pack`
1543 :return: bytes of msgpack (if no filename provided)
1544 """
1545 return _to_msgpack(self.to_dict(), filename=filename, **kwargs)
1546
1547 @classmethod
1548 def from_msgpack(

Calls 3

to_dictMethod · 0.95
_to_msgpackFunction · 0.90
BoxErrorClass · 0.90