monty.msgpack module — monty 2021.8.17 documentation

# monty.msgpack module

msgpack serialization and deserialization utilities. Right now, this is a stub using monty.json encoder and decoders. The naming is just for clearer usage with msgpack’s default and object_hook naming.

default(obj)

  For use with msgpack.packb(obj, default=default). Supports Monty’s as_dict protocol, numpy arrays and datetime.

object_hook(d)

  For use with msgpack.unpackb(dict, object_hook=object_hook.). Supports Monty’s as_dict protocol, numpy arrays and datetime.