pygenestore
Python bindings for genegraph-storage. Store numpy arrays, pyarrow collections, scipy sparse matrices and graphs at scale in Lance or Zarr format. Handles millions of rows as far as memory goes.
Usage
Each directory is a separate storage. Pass backend="zarr" for the Zarr
backend; the default is Lance.
Default Lance API (blocking)
import numpy as np
import genestore
# Configure storage
builder = genestore.store_array("./lance_data")
builder.with_max_rows_per_file(500_000)
builder.with_compression("zstd")
# Build storage instance
storage = builder.build()
# Create data (2D float64 numpy array)
np.random.seed(3407)
x = np.random.randn(1000, 128).astype(np.float64)
# Store (blocking)
path = storage.store(x, "my_dataset")
print("Stored at:", path)
# Load (blocking)
y = storage.load("my_dataset")
print("Loaded shape:", y.shape)
# Verify roundtrip
assert np.array_equal(x, y)
Zarr backend (append/overwrite)
zstore = genestore.store_array("./zarr_data", backend="zarr").build()
zstore.store(x, "dataset") # rejects overwrites
start, nrows = zstore.append("dataset", more)
n = zstore.overwrite("dataset", [(5, vector)])
entries = zstore.list_datasets() # shape, dtype, path per dataset
summary = zstore.summary("dataset")
Appends serialize per dataset; concurrent appends from other processes
surface genestore.StorageError naming the lock file.
Arrow collections (polars and pandas friendly)
store_table accepts a pyarrow Table or RecordBatch; vector-space
schemas require non-nullable columns. Polars and pandas DataFrames
convert to pyarrow Tables with zero copy.
import pyarrow as pa
t = pa.table({"id": ids, "vectors": fixed_size_list_array})
storage.store_table(t, "vecs", properties={"origin": "ingest"})
loaded = storage.load_table("vecs") # pa.Table
Sparse matrices (scipy)
Sparse collections live on the Lance backend. Keys use the kernel's
logical artifact vocabulary: adjacency, laplacian, signals.
m = csr_array(x)
storage.store_sparse(m.indptr, m.indices, m.data, m.shape, "adjacency")
indptr, indices, data, shape = storage.load_sparse("adjacency")
rebuilt = csr_array((data, indices, indptr), shape=shape)
Graphs
storage.store_graph("g", src, dst, weights=w, num_nodes=4)
g = storage.load_graph("g") # src, dst, weight arrays + facts
Pass node_id_width="u64" when ids exceed u32::MAX.
Async API
import asyncio
async def main():
builder = genestore.create_storage("./lance_data")
storage = builder.build()
path = await storage.aio.store(x, "my_dataset")
y = await storage.aio.load("my_dataset")
start, nrows = await storage.aio.append("dataset", more) # zarr backend
asyncio.run(main())
Errors
All storage failures raise genestore.StorageError. Kernel error
variants (invalid data, unsupported filetype, lock contention) surface
through it with the kernel's message.
Tests
The dev environment is managed with uv and declared in pyproject.toml:
uv sync --group dev
uv run maturin develop --release
uv run pytest tests/
Metadata
Release files for genestore 0.72.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 |
|---|---|---|---|---|
| genestore-0.72.0.tar.gz | 31.8 kB | Without provenance | Details for genestore-0.72.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| genestore-0.72.0-cp313-cp313-macosx_11_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 11.0+ ARM64 | Details for genestore-0.72.0-cp313-cp313-macosx_11_0_arm64.whl |
Total release size: 4.6 MB
Release files / genestore-0.72.0.tar.gz
| Download URL | genestore-0.72.0.tar.gz |
|---|---|
| Size | 31.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
172b7d4d0c25dac6d0cdafbb70137950d1358aae43de43d36e66474c24931d12
|
|
BLAKE2b-256 checksum How to use checksums |
cc438c1ee56c93a9f7c9aa130bf6ba7931c80d6b4531c35c4b090c1a6a1ebb92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / genestore-0.72.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | genestore-0.72.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.6 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ce10b62771f14f19e4ff243faac3fa05254d70dd2ca65bc383f5666bbf4190c2
|
|
BLAKE2b-256 checksum How to use checksums |
720f91977264d97a012e9838631193ba4ac486e8e1c29f8088b41ba69c0e6cea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for genestore 0.72.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.