{"id":45095,"library":"hickle","title":"Hickle","description":"Hickle is an HDF5-based serialization library for Python, designed as a drop-in replacement for pickle with better performance and cross-language support. Current version is 5.0.3, supporting Python >=3.7. It wraps h5py and allows saving/loading Python objects (including NumPy arrays) in HDF5 files. Release cadence is irregular.","status":"active","version":"5.0.3","language":"python","source_language":"en","source_url":"http://github.com/telegraphic/hickle","tags":["serialization","hdf5","pickle","hickle","numpy"],"install":[{"cmd":"pip install hickle","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for HDF5 file operations","package":"h5py","optional":false},{"reason":"Required for array serialization","package":"numpy","optional":false}],"imports":[{"note":"Wildcard imports are discouraged; use explicit module.","wrong":"from hickle import *","symbol":"hickle","correct":"import hickle"}],"quickstart":{"code":"import hickle\nimport numpy as np\n\ndata = {'array': np.array([1,2,3]), 'string': 'hello'}\n# Save to HDF5 file\nhickle.dump(data, 'data.hickle5')\n# Load back\nloaded = hickle.load('data.hickle5')\nprint(loaded)","lang":"python","description":"Serialize a dictionary containing a NumPy array to an HDF5 file and read it back."},"warnings":[{"fix":"Only use hickle for objects with a simple structure or implement custom serialization hooks.","message":"hickle does not serialize arbitrary Python objects like functions or classes; it primarily supports basic types, NumPy arrays, dicts, lists, and tuples. Attempting to pickle complex objects may raise an error.","severity":"gotcha","affected_versions":"all"},{"fix":"Use '.hickle5' extension for new HDF5 files. For legacy '.hickle' files, use hickle.load with explicit format='pickle' if needed.","message":"File extension should be '.hickle5' (HDF5-based) not '.hickle' (old format). Using the old extension may cause confusion.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Migrate existing hickle files to hickle5 by loading and re-saving with hickle.dump(..., format='hickle5').","message":"The old pickle-based format ('.hickle' extension) is deprecated in favor of HDF5 ('.hickle5'). Loading the old format still works but saving will use HDF5 by default.","severity":"deprecated","affected_versions":">=4.0.0"}],"env_vars":null,"search_vec":"'3.7':35 '5.0.3':32 'allow':40 'array':46 'base':7 'better':22 'cadenc':51 'cross':26 'cross-languag':25 'current':29 'design':12 'drop':16 'drop-in':15 'file':49 'h5py':38 'hdf5':6,48,55 'hdf5-based':5 'hickl':1,2,57 'includ':44 'irregular':53 'languag':27 'librari':9 'numpi':45,58 'object':43 'perform':23 'pickl':20,56 'python':11,34,42 'releas':50 'replac':18 'saving/loading':41 'serial':8,54 'support':28,33 'version':30 'wrap':37","created_at":"2026-06-07T12:53:21.043233+00:00","updated_at":"2026-06-07T12:53:21.043233+00:00","problems":[{"fix":"Run 'pip install hickle'.","cause":"hickle is not installed.","error":"ImportError: No module named 'hickle'"},{"fix":"Remove the function from the data before serialization, or implement a workaround (e.g., store function name as string).","cause":"hickle cannot serialize functions or lambdas.","error":"ValueError: Unsupported type: <class 'function'>"},{"fix":"Ensure the object contains only hickle-compatible types (dict, list, tuple, numpy arrays, scalars, strings, bytes, None).","cause":"hickle uses JSON for metadata, and some types (e.g., custom classes) are not directly supported.","error":"TypeError: Object of type XXX is not JSON serializable"},{"fix":"Check data for NaN, Inf, or unsupported dtypes; try saving without compression (compression=None in h5py).","cause":"HDF5 compression error, often due to incompatible data types or corruption.","error":"h5py._errors.Can't write data (inflate request failed)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"http://github.com/telegraphic/hickle","github":"http://github.com/telegraphic/hickle","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}