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)
| 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( |