Metadata-Version: 2.4
Name: polystore
Version: 0.1.17
Summary: Framework-agnostic multi-backend storage abstraction for ML and scientific computing
Author-email: Tristan Simas <tristan.simas@mail.mcgill.ca>
License: MIT License
Project-URL: Homepage, https://github.com/OpenHCSDev/PolyStore
Project-URL: Documentation, https://polystore.readthedocs.io
Project-URL: Bug Reports, https://github.com/OpenHCSDev/PolyStore/issues
Project-URL: Source, https://github.com/OpenHCSDev/PolyStore
Keywords: storage,backend,multi-framework,numpy,pytorch,jax,tensorflow,zarr,io,data
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: arraybridge>=0.2.9
Requires-Dist: numpy>=1.26.0
Requires-Dist: portalocker>=2.8.0
Requires-Dist: metaclass-registry>=0.1.5
Requires-Dist: imageio>=2.37.0
Requires-Dist: zarr<3.0,>=2.18.0
Requires-Dist: ome-zarr>=0.11.0
Requires-Dist: zmqruntime>=0.1.9
Provides-Extra: zarr
Requires-Dist: zarr<3.0,>=2.18.0; extra == "zarr"
Requires-Dist: ome-zarr>=0.11.0; extra == "zarr"
Provides-Extra: torch
Requires-Dist: torch>=2.0.0; extra == "torch"
Provides-Extra: jax
Requires-Dist: jax>=0.4.0; extra == "jax"
Provides-Extra: tensorflow
Requires-Dist: tensorflow>=2.12.0; extra == "tensorflow"
Provides-Extra: cupy
Requires-Dist: cupy>=12.0.0; extra == "cupy"
Provides-Extra: streaming
Requires-Dist: pyzmq>=25.0.0; extra == "streaming"
Provides-Extra: all
Requires-Dist: zarr<3.0,>=2.18.0; extra == "all"
Requires-Dist: ome-zarr>=0.11.0; extra == "all"
Requires-Dist: torch>=2.0.0; extra == "all"
Requires-Dist: jax>=0.4.0; extra == "all"
Requires-Dist: tensorflow>=2.12.0; extra == "all"
Requires-Dist: cupy>=12.0.0; extra == "all"
Requires-Dist: pyzmq>=25.0.0; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: coverage>=7.3.2; extra == "dev"
Requires-Dist: genbadge[coverage]; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=4.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
Requires-Dist: sphinx-toolbox>=3.0.0; extra == "docs"
Requires-Dist: sphinx-design>=0.5.0; extra == "docs"
Provides-Extra: gpu
Requires-Dist: zarr<3.0,>=2.18.0; extra == "gpu"
Requires-Dist: ome-zarr>=0.11.0; extra == "gpu"
Requires-Dist: torch<2.8.0,>=2.6.0; extra == "gpu"
Requires-Dist: torchvision<0.23.0,>=0.21.0; extra == "gpu"
Requires-Dist: jax<0.6.0,>=0.5.3; extra == "gpu"
Requires-Dist: jaxlib<0.6.0,>=0.5.3; extra == "gpu"
Requires-Dist: jax-cuda12-pjrt<0.6.0,>=0.5.3; extra == "gpu"
Requires-Dist: jax-cuda12-plugin<0.6.0,>=0.5.3; extra == "gpu"
Requires-Dist: cupy-cuda12x<14.0.0,>=13.3.0; extra == "gpu"
Requires-Dist: cucim-cu12<26.0.0,>=25.6.0; extra == "gpu"
Requires-Dist: tensorflow<2.20.0,>=2.19.0; extra == "gpu"
Requires-Dist: tensorflow-probability[tf]<0.26.0,>=0.25.0; extra == "gpu"
Requires-Dist: pyclesperanto>=0.17.1; extra == "gpu"
Dynamic: license-file

# PolyStore

Framework-agnostic storage primitives for scientific applications.

[![PyPI version](https://badge.fury.io/py/polystore.svg)](https://badge.fury.io/py/polystore)
[![Documentation Status](https://readthedocs.org/projects/polystore/badge/?version=latest)](https://polystore.readthedocs.io/en/latest/)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)

PolyStore owns backend interfaces, execution-local backend registries,
``FileManager`` routing, storage formats, ROI values, virtual-workspace source
references, and viewer-streaming payload mechanics. Applications retain
ownership of domain artifact names and materialization policy.

## Quick start

Pass an explicit mapping of backend names to instances. ``FileManager`` has no
global fallback and does not infer a backend from a path.

```python
from pathlib import Path
import numpy as np

from polystore import DiskBackend, FileManager, MemoryBackend

registry = {
    "disk": DiskBackend(),
    "memory": MemoryBackend(),
}
files = FileManager(registry)

data = np.arange(6).reshape(2, 3)
files.save(data, Path("output.npy"), backend="disk")
loaded = files.load(Path("output.npy"), backend="disk")
```

For application startup where every discoverable context-free backend is
wanted, use the package-owned lazy registry:

```python
from polystore import FileManager, ensure_storage_registry, storage_registry

ensure_storage_registry()
files = FileManager(dict(storage_registry))
```

Backends requiring context-specific construction, including virtual workspaces
and OMERO, must be instantiated by the application and added to its registry.

## Nominal backend extension

Concrete backends inherit ``DataSource``, ``DataSink``, ``StorageBackend``, or
``ReadOnlyBackend`` and declare their backend key. The authoritative class
catalog is ``BackendBase.__registry__`` (also exported as
``STORAGE_BACKENDS``). Do not build a second backend class table.

## Installation

```bash
python -m pip install polystore
```

The core install includes NumPy, ArrayBridge, metaclass-registry, file locking,
image I/O, and Zarr/OME-Zarr support. Framework and streaming extras add their
corresponding optional runtimes.

Full documentation: [polystore.readthedocs.io](https://polystore.readthedocs.io)
