Skip to main content

A (de)serialization library for multidimensional arrays

Project description

seedee

A data format for n-dimensional arrays.

This project is in an early stage of development and should be used with caution

Installation

Python

Pre-built Python wheels can be installed via pip:

python3 -m pip install seedee

To build a wheel yourself, e.g., if your platform is not supported by the pre-built wheels, download the latest release and extract it. Inside the source directory, run:

$ cmake -S . -B build -DBUILD_PYTHON=ON -DCMAKE_BUILD_TYPE=Release
$ cmake --build build --target python-wheel --verbose

Building requires cmake version 3.13 or newer.

If everything works, the wheel is created in the build/python/dist/ subdirectory and can be installed via pip.

C/C++

To build and install the C/C++ libraries, run:

$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=path/to/install/dir
$ cmake --build build --target seedee --verbose
$ cmake --install build

Building requires cmake version 3.13 or newer.

Usage example

Python

import numpy as np
import seedee

# Create a numpy array of some dimension, shape, and dtype
array = np.arange(48).reshape((6, 8)).astype("uint16")

# Serialize the array using the bitshuffle+lz4 compression method
buffer, meta = seedee.serialize(array, seedee.COMPRESSION_BITSHUFFLE)
# buffer is a 1D numpy array of type uint8
# meta is a string

# Send buffer and meta to a remote process using any preferred method,
# e.g., via a ZMQ multi-message
...

# Deserialize the received buffer and meta into a numpy array
new_array = seedee.deserialize(buffer, meta)

# The resulting array is equal to the original array
assert np.all(array == new_array)

C/C++

See test directory for some examples. Note that the C/C++ interface will likely change in the future.

Limitations

Only arrays up to 1GB are supported.

Contribution

Please feel free to open issues or pull requests.

Acknowledgments

seedee depends on multiple open source libraries that are included in this repository under the thirdparty directory for convenience. The licenses of these dependencies can be found in the corresponding subdirectories and in LICENSE_THIRDPARTY.txt.

The chunk serializer implementations are based on the corresponding HDF5 filter plugins which are subject to their own licenses:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seedee-0.3.0.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distributions

seedee-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (801.0 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

seedee-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (812.2 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

seedee-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (764.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

seedee-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (767.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

seedee-0.3.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (741.7 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

seedee-0.3.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (684.3 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

seedee-0.3.0-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (675.2 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page