anndata.experimental.WriteCallback

anndata.experimental.WriteCallback#

protocol anndata.experimental.WriteCallback[source]#

typing.Protocol.

Classes that implement this protocol must have the following methods / attributes:

__call__(write_func, store, elem_name, elem, *, iospec, dataset_kwargs)[source]#

Callback used in anndata.experimental.write_dispatched() to customize writing an element to a store.

Parameters:
write_func Write[InMemoryElem]

anndata.experimental.write_elem() function to call to read the current element given the iospec.

store Union[Array, Dataset, Group, Group]

The store to which elem should be written.

elem_name str

The key to read in from the group.

elem InMemoryElem

The element to write out.

iospec IOSpec

Internal AnnData encoding specification for the element.

dataset_kwargs Mapping[str, Any]

Keyword arguments to be passed to a library-level io function, like chunks for Zarr-Python.

Return type:

None