manykinds
The typed data-kind vocabulary for the latent-reasoning stack.
A kind is a self-describing data object that guards its own structure — it
validates on construction and refuses an op that demands structure it lacks,
instead of being a bare array whose axes you have to trust. manykinds is the
small, shared package that defines that vocabulary so independent tools can
interoperate through it without depending on each other.
It's the same pattern as anndata in single-cell or the Array API standard for
array libraries: one light package everyone agrees on, rather than each tool
inventing (or embedding) its own data contract.
What's in it
Kind— a@runtime_checkablestructural protocol (provenance,require,tagged). Orchestrators type their ops against it; a concrete kind is substitutable iff it offers the three members — no inheritance required. Lives inmanykinds.baseand imports without the array stack.LabeledArray— anxarray.DataArraywith named dims + dim-aligned coords. The canonical kind for cell×gene matrices and embeddings. Dense andsparse.COO-backed arrays both serialize to zarr (validating on read).SparseGraph— a graph as numpy arrays (an E×2 integer edge list + node ids, plus optionaledge_weightsfor weighted/signed graphs like GRNs)..npz.FileArtifact— an opaque reference to a file a tool produced (path + format + checksum). The escape hatch for outputs the vocabulary doesn't model structurally: carry the file through a pipeline unchanged.Table— heterogeneous columnar data (a pandas DataFrame) for mixed-dtype tables like AnnDataobs/var. Parquet persistence (manykinds[table]extra).Sequence— biological sequences over an alphabet (DNA/protein), with optional ids..npz.KindSpec— a data-free structural signature (kind name + dims + coords).spec_a.satisfies(spec_b)is the plan-time mirror ofKind.require, so an orchestrator can type an op's inputs/outputs and check a chain is valid before running it. A concrete kind reports its own signature via.spec().
Usage
import xarray as xr, numpy as np
from manykinds import Kind, LabeledArray
la = LabeledArray(
xr.DataArray(
np.random.randn(100, 2000),
dims=("cell", "gene"),
coords={"time": ("cell", np.zeros(100, dtype=int))},
)
)
isinstance(la, Kind) # True — structural, no inheritance
la.require("cell", "gene", coords=("time",)) # precondition gate; raises if absent
la = la.tagged("pca") # append to the immutable provenance trail
la.serialize("embedding.zarr") # dense or sparse; validates on load
Who depends on it
- Producers (dataset adapters like
manylatents-omics, model wrappers, tool shims) construct kinds from their own formats. - Orchestrators (e.g. an op registry / planner) type their ops against
Kindand chain a producer's output into a consumer'srequire.
The vocabulary is deliberately small and stable — it changes far more slowly than the tools that speak it.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file manykinds-0.1.1.tar.gz.
File metadata
- Download URL: manykinds-0.1.1.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
154e0f9a3bf008b01a3ba5b161e423d678f493d5cb582532ffe9527c18bb0de5
|
|
| MD5 |
dc5fb5ceaece8b1b96f7fe2672504866
|
|
| BLAKE2b-256 |
74858cd4d08c6a31f9c1c08ce80e78f62950709c52bceaf4d1f40f3fbf92f77d
|
Provenance
The following attestation bundles were made for manykinds-0.1.1.tar.gz:
Publisher:
publish.yml on latent-reasoning-works/manykinds
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
manykinds-0.1.1.tar.gz -
Subject digest:
154e0f9a3bf008b01a3ba5b161e423d678f493d5cb582532ffe9527c18bb0de5 - Sigstore transparency entry: 2174862385
- Sigstore integration time:
-
Permalink:
latent-reasoning-works/manykinds@347b4e45b01cfea51a26ec92ed3ede59145b97be -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/latent-reasoning-works
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@347b4e45b01cfea51a26ec92ed3ede59145b97be -
Trigger Event:
push
-
Statement type:
File details
Details for the file manykinds-0.1.1-py3-none-any.whl.
File metadata
- Download URL: manykinds-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5efbb8874b86857dbcee5d06706c73dfdfee3285d0acb5dc68261c151eb20742
|
|
| MD5 |
20bf49df9d03161bf311aa4988e2d7ae
|
|
| BLAKE2b-256 |
b8e8f6f1660e6dda86db23fcd4d060680b2f71b9a7bcbd942f9e17ac7a853158
|
Provenance
The following attestation bundles were made for manykinds-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on latent-reasoning-works/manykinds
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
manykinds-0.1.1-py3-none-any.whl -
Subject digest:
5efbb8874b86857dbcee5d06706c73dfdfee3285d0acb5dc68261c151eb20742 - Sigstore transparency entry: 2174862569
- Sigstore integration time:
-
Permalink:
latent-reasoning-works/manykinds@347b4e45b01cfea51a26ec92ed3ede59145b97be -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/latent-reasoning-works
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@347b4e45b01cfea51a26ec92ed3ede59145b97be -
Trigger Event:
push
-
Statement type: