Python-Blosc2
A Python wrapper for the extremely fast Blosc2 compression library
- Author:
The Blosc development team
- Contact:
- Github:
- Actions:
- PyPi:
- NumFOCUS:
- Code of Conduct:
What it is
C-Blosc2 is the new major version of C-Blosc, and is backward compatible with both the C-Blosc1 API and its in-memory format. Python-Blosc2 is a Python package that wraps C-Blosc2, the newest version of the Blosc compressor.
Currently Python-Blosc2 already reproduces the API of Python-Blosc, so it can be used as a drop-in replacement. However, there are a few exceptions for a full compatibility.
In addition, Python-Blosc2 aims to leverage the full C-Blosc2 functionality to support super-chunks (SChunk), multi-dimensional arrays (NDArray), metadata, serialization and other bells and whistles introduced in C-Blosc2.
Note: Python-Blosc2 is meant to be backward compatible with Python-Blosc data. That means that it can read data generated with Python-Blosc, but the opposite is not true (i.e. there is no forward compatibility).
SChunk: a 64-bit compressed store
A SChunk is a simple data container that handles setting, expanding and getting data and metadata. Contrarily to chunks, a super-chunk can update and resize the data that it contains, supports user metadata, and it does not have the 2 GB storage limitation.
Additionally, you can convert a SChunk into a contiguous, serialized buffer (aka cframe) and vice-versa; as a bonus, the serialization/deserialization process also works with NumPy arrays and PyTorch/TensorFlow tensors at a blazing speed:
while reaching excellent compression ratios:
Also, if you are a Mac M1/M2 owner, make you a favor and use its native arm64 arch (yes, we are distributing Mac arm64 wheels too; you are welcome ;-):
Read more about SChunk features in our blog entry at: https://www.blosc.org/posts/python-blosc2-improvements
NDArray: an N-Dimensional store
One of the latest and more exciting additions in Python-Blosc2 is the NDArray object. It can write and read n-dimensional datasets in an extremely efficient way thanks to a n-dim 2-level partitioning, allowing to slice and dice arbitrary large and compressed data in a more fine-grained way:
To wet you appetite, here it is how the NDArray object performs on getting slices orthogonal to the different axis of a 4-dim dataset:
We have blogged about this: https://www.blosc.org/posts/blosc2-ndim-intro
We also have a ~2 min explanatory video on why slicing in a pineapple-style (aka double partition) is useful:
Installing
Blosc is now offering Python wheels for the main OS (Win, Mac and Linux) and platforms. You can install binary packages from PyPi using pip:
pip install blosc2
Documentation
The documentation is here:
https://blosc.org/python-blosc2/python-blosc2.html
Also, some examples are available on:
Building from sources
python-blosc2 comes with the C-Blosc2 sources with it and can be built in-place:
git clone https://github.com/Blosc/python-blosc2/
cd python-blosc2
git submodule update --init --recursive
python -m pip install -r requirements-build.txt
python setup.py build_ext --inplace
That’s all. You can proceed with testing section now.
Testing
After compiling, you can quickly check that the package is sane by running the tests:
python -m pip install -r requirements-tests.txt
python -m pytest (add -v for verbose mode)
Benchmarking
If curious, you may want to run a small benchmark that compares a plain NumPy array copy against compression through different compressors in your Blosc build:
PYTHONPATH=. python bench/pack_compress.py
License
The software is licenses under a 3-Clause BSD license. A copy of the python-blosc2 license can be found in LICENSE.txt.
Mailing list
Discussion about this module is welcome in the Blosc list:
Please follow @Blosc2 to get informed about the latest developments.
Citing Blosc
You can cite our work on the different libraries under the Blosc umbrella as:
@ONLINE{blosc,
author = {{Blosc Development Team}},
title = "{A fast, compressed and persistent data store library}",
year = {2009-2023},
note = {https://blosc.org}
}
Enjoy!
Metadata
Release files for blosc2 2.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| blosc2-2.6.0.tar.gz | 5.1 MB | Without provenance | Details for blosc2-2.6.0.tar.gz |
Built distributions (wheels)
Total release size: 80.9 MB
Release files / blosc2-2.6.0.tar.gz
| Download URL | blosc2-2.6.0.tar.gz |
|---|---|
| Size | 5.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e4da425632e5588595998a55ab9766e8ac1434089bf41e6dca0ac0b3706a25c
|
|
BLAKE2b-256 checksum How to use checksums |
26828163b22dfc7d556b4a93d4752ae43ac4ba190d0b96d1431a1e2bca5051c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp312-cp312-win_amd64.whl
| Download URL | blosc2-2.6.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
89b7583c4b9dfb896895adc605bebf1ff04a80455f7dabc48b826c2e1fb268b1
|
|
BLAKE2b-256 checksum How to use checksums |
09d2167f4ba358be11def46227c2a1b39c9025a5d543d9f7d557f337d7508164
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp312-cp312-win32.whl
| Download URL | blosc2-2.6.0-cp312-cp312-win32.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.12 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
3e9a8f52fe9010c8ff5f315096dd6533fb3d1c14ece9b8590b3439aef8f729e1
|
|
BLAKE2b-256 checksum How to use checksums |
6e54eae6eca4f7a0d72311481ea9f33a6ae054db9cebd5f2b5033bb347f90667
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp312-cp312-musllinux_1_1_x86_64.whl
| Download URL | blosc2-2.6.0-cp312-cp312-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.12 Linux musl 1.1+ x86-64 |
|
SHA-256 checksum How to use checksums |
f7ac178828f861f5a44257ec7a9299ae20039fdd38ada4e742f216a7680f59c8
|
|
BLAKE2b-256 checksum How to use checksums |
16f42a9110b6da50b459f6332e4d69c4a749159e5bd3fde6aa7fca5d4119cc35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | blosc2-2.6.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
097976a68c26a826fd2410eece0809f7949f5d1e3625176de38dc04a0bf6dc0d
|
|
BLAKE2b-256 checksum How to use checksums |
dfe5307547ddd2b7d129433941005a7e8960cf02b3979b9f817f369bc8d0bf0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | blosc2-2.6.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
bc8152256940f89d98704efab46a1c002ccc7c6178f78b92977302f7eed06e39
|
|
BLAKE2b-256 checksum How to use checksums |
2976190ec473dd1a8d8d559d4770919bcadda65431cce392ce7a01472d130cae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | blosc2-2.6.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0304f3145f3c4e5992c2c683dd66e688172ce6544b338584a4369a38eff4093c
|
|
BLAKE2b-256 checksum How to use checksums |
1925d2950b24817f9604e601988a89dfa873114ea54695e85129a225f0daefe2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp312-cp312-macosx_10_9_x86_64.whl
| Download URL | blosc2-2.6.0-cp312-cp312-macosx_10_9_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.12 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
6747bfb5ccafa47ef99243fda220be508b7b8324008b696046cf035d23020fe9
|
|
BLAKE2b-256 checksum How to use checksums |
0c41b2ade0322ed5baec8b968fe580847e1acf82bb43ff77c83ab46810abf8da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp311-cp311-win_amd64.whl
| Download URL | blosc2-2.6.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d9672cfbe751c7a8705b3660721d16c4c0ea857b3201a2872087c9a2bb9f87b3
|
|
BLAKE2b-256 checksum How to use checksums |
6e7a76f099465b07437eeae3c64a82c3273301bfd9af8d33724c52ffeb16c9f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp311-cp311-win32.whl
| Download URL | blosc2-2.6.0-cp311-cp311-win32.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
c9639629bd5a0accf4b5ac8da11985aebee5fb20def78ce96037fd29a220c82c
|
|
BLAKE2b-256 checksum How to use checksums |
01027f9e3c6ea80b1a275c764dacd7229c5f8cfb3efecd78410e641f902e2f6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp311-cp311-musllinux_1_1_x86_64.whl
| Download URL | blosc2-2.6.0-cp311-cp311-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.11 Linux musl 1.1+ x86-64 |
|
SHA-256 checksum How to use checksums |
3e9a2fbd36781573779b7c1d7f493bc994f4fee085d4e88a2efc3d372f03f4ce
|
|
BLAKE2b-256 checksum How to use checksums |
c8e0d7487e71f478bf0ea68ab2ac8710e36eabfe1b223b62289d7b2d8e08db5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | blosc2-2.6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
960a6de48d9bf194b6458a1a59cc5f2d8e1d8e75415148a2a81d89e83593fe59
|
|
BLAKE2b-256 checksum How to use checksums |
f19a7fc548a6b88e1919608e58885aa5485e972791c58a8392bad5b3bdf23f66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | blosc2-2.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
1d44812ec44fd35338da5bb72ce93f79484395f90805f36591dd1523f645fa0f
|
|
BLAKE2b-256 checksum How to use checksums |
57e8ae88f05e60fb3eee9946a592a28c201e6f4ac790bb0506c21b48b2a6db48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | blosc2-2.6.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
df7a961876ce7650d26dc66ae52567608ea9bd910746dcc44f3254d8b1bb5cc6
|
|
BLAKE2b-256 checksum How to use checksums |
cd3f44b68af60824fe4d921ad1f1255a92f5335c46c87529a84d1f4cc105e1a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | blosc2-2.6.0-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
633f9dcd3b4712b1dc38a77f631fe3d8e712bc1caa1a896ef861de8fd1b07aef
|
|
BLAKE2b-256 checksum How to use checksums |
6343eca77b36c4f0e7bd947586776971b6ca58d862f7cdc174c48dc542f0fe4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp310-cp310-win_amd64.whl
| Download URL | blosc2-2.6.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
89a092093ffe0b6fd535a76707c5c58cc860aca582a42cf110a8ca19c1f7ada2
|
|
BLAKE2b-256 checksum How to use checksums |
3024727a1deb09e5095a42b171449bfd44a4a2dbe04c0f37e95b3ff5ad2094dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp310-cp310-win32.whl
| Download URL | blosc2-2.6.0-cp310-cp310-win32.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.10 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
d7bd3ff65e8105081bf980bf830b562ea6260c1b1e12810007e513f35f80f74e
|
|
BLAKE2b-256 checksum How to use checksums |
f977a5f25065771603c6e6acc3fd0491cc50b1077784df66b17d7f931af77924
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp310-cp310-musllinux_1_1_x86_64.whl
| Download URL | blosc2-2.6.0-cp310-cp310-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.10 Linux musl 1.1+ x86-64 |
|
SHA-256 checksum How to use checksums |
b081d5fae153f9d1ef2864155d2a49d287cc404c2a574d66c3ce06b238f48320
|
|
BLAKE2b-256 checksum How to use checksums |
7c9f7e072236bbea74e3e0d42980dd2b0eca5af8e02e321ac3945fa5a3b2cd81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | blosc2-2.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
4be2bc0491c8aa84aa6afe9bd031712e61f384ba202ee8e8bfd79239c754e915
|
|
BLAKE2b-256 checksum How to use checksums |
aa91ef7e0763d09bbd50822fe303aa0fc827eb5b5befd48199509ac9efc4843e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | blosc2-2.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
9e09a756c5692802d063bf84e12891d4dd61bbb6493141596b3ad2a031fbf427
|
|
BLAKE2b-256 checksum How to use checksums |
689c056e8fecbd570bd17d32e4ded8705a9c68037b9453e8d8b7b12cfd2f83cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | blosc2-2.6.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4142591a6bd6653961fa1f1f0f822150dd9464520f34403ae24b18201eaff324
|
|
BLAKE2b-256 checksum How to use checksums |
31cf0fb7d1e2aa791edbb4214fbda8f249c9f9fff0e3cee16dcdd0a9e4426e72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / blosc2-2.6.0-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | blosc2-2.6.0-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
cc5c2da7564b6c3c5ed829cba876b586b0072ead5cdebd629ab33d3e5f4aa78a
|
|
BLAKE2b-256 checksum How to use checksums |
f046774acdf5e11c50fc5f88e90c0e4171de3d80d29b39fd279333a0574014a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for blosc2 2.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.