Zappy - distributed processing with NumPy and Zarr
Zappy is for distributed processing of chunked NumPy arrays on engines like Pywren, Apache Spark, and Apache Beam.
The zappy.base module defines a ZappyArray class that exposes the same interface as numpy.ndarray, and which
is backed by distributed storage and processing. The array is broken into chunks, and is typically loaded from Zarr,
and each chunk is processed independently.
There are a few engines provided:
- direct - for eager in-memory processing
- spark - for processing using Spark
- beam - for processing using Beam or Google Dataflow
- executor - for processing using Python's concurrent.futures.Executor, of which Pywren is a notable implementation
Beam currently only runs on Python 2.
Full coverage of the numpy.ndarray interface is not provided. Only enough has been implemented to support running
parts of Scanpy, as demonstrated in the Single Cell Experiments repo.
Installation
pip install zappy
Alternatively, zappy can be installed using Conda (most easily obtained via the Miniconda Python distribution):
conda install -c conda-forge zappy
Demo
Take a look at the rendered demo Jupyter notebook, or try it out yourself as follows.
Create and activate a Python 3 virtualenv, and install the requirements:
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
pip install -e .
pip install s3fs jupyter
Then run the notebook with:
jupyter notebook demo.ipynb
Testing
There is a test suite for all the engines, covering both Python 2 and 3.
Run everything in one go with tox:
pip install tox
tox
Formatting:
pip install black
black zappy tests/* *.py
Coverage:
pip install pytest-cov
pytest --cov-report html --cov=zappy
open htmlcov/index.html
Publishing
pip install twine
python setup.py sdist
twine upload -r pypi dist/zappy-0.1.0.tar.gz
If successful, the package will be available on PyPI.
Metadata
Release files for zappy 0.2.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 |
|---|---|---|---|---|
| zappy-0.2.0.tar.gz | 16.9 kB | Without provenance | Details for zappy-0.2.0.tar.gz |
Release files / zappy-0.2.0.tar.gz
| Download URL | zappy-0.2.0.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f4802f02ee26c6b4292209ff19cb06fece0252ee2128cdc739392fe0049c3e7
|
|
BLAKE2b-256 checksum How to use checksums |
7fdd8a3a895fb3bb0e71a31a505dde8d1edf4237a6c127745e30e5a9a8249d09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.5
|
Security for zappy 0.2.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.