hickleable#

https://codecov.io/gh/steven-murray/hickleable/branch/main/graph/badge.svg?token=7TRaE5cJzZ PyPI - License https://img.shields.io/badge/code%20style-black-000000.svg Documentation Status

A simple decorator to make your classes hickle-able.

What is this?#

hickleable provides a simple decorator for your classes that will almost always make them serilalize well using the excellent hickle package. By default, custom classes are not supported by hickle – instead, they are written to the HDF5 file as a binary dataset that is serialized using the standard Python pickle. This obviously negates much of the benefit of hickle, for example, the fact that pickle-serialized data is only readable using Python.

hickle provides a way to serialize your custom classes using the HDF5 format, via defining a few hooks for loading/dumping. However, it can be a little tricky to implement these hooks, as they are quite general.

hickleable provides a “default implementation” of these hooks that should satisfy the requirements of most custom classes, and can be applied as a simple decorator. This makes it a one-liner to transform your class into a well-supported data format.

Check out the docs at ReadTheDocs.