API Reference
This section documents the complete API for polystore.
API Documentation:
Core Components
FileManager
BackendRegistry
Overview
The polystore API is organized around several key concepts:
- FileManager
The main interface for saving and loading data. Coordinates between different storage backends.
- Storage Backends
Pluggable storage implementations (disk, memory, zarr, streaming). Each backend implements the same interface.
- Backend Registry
Auto-discovers and manages available storage backends using metaclass registration.
- Atomic Operations
Utilities for atomic file writes with automatic locking.
- Exceptions
Custom exception hierarchy for storage operations.
Quick Reference
Common Imports
from polystore import (
FileManager,
BackendRegistry,
MemoryBackend,
DiskBackend,
ZarrBackend,
atomic_write,
atomic_write_json,
)
Main Classes
Class |
Description |
|---|---|
|
High-level API for storage operations |
|
Registry of available storage backends |
|
In-memory storage backend |
|
Local filesystem storage backend |
|
Zarr/OME-Zarr array storage backend |
|
ZeroMQ streaming backend (optional) |
Main Functions
Function |
Description |
|---|---|
|
Context manager for atomic file writes |
|
Atomically write JSON data to file |
Exceptions
Exception |
Description |
|---|---|
|
Base exception for storage operations |
|
Failed to resolve storage path or backend |
|
Requested backend not available |
|
File format not supported |
|
Failed to load image |
|
Failed to save image |