anndata.experimental.WriteCallback#

class anndata.experimental.WriteCallback[RWAble: RWAble](*args, **kwargs)#

Bases: Protocol

Methods

__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[RWAble]

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

store StorageType

The store to which elem should be written.

elem_name str

The key to write out to the group.

elem RWAble

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.

Return type:

None