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)
| 1552 | if msgpack_available: |
| 1553 | |
| 1554 | def to_msgpack(self, filename: str | PathLike | None = None, **kwargs): |
| 1555 | """ |
| 1556 | Transform the Box object into a msgpack string. |
| 1557 | |
| 1558 | :param filename: File to write msgpack object too |
| 1559 | :param kwargs: parameters to pass to `msgpack.pack` |
| 1560 | :return: bytes of msgpack (if no filename provided) |
| 1561 | """ |
| 1562 | return _to_msgpack(self.to_dict(), filename=filename, **kwargs) |
| 1563 | |
| 1564 | @classmethod |
| 1565 | def from_msgpack( |