registry
zarr.registry ¶
__all__
module-attribute
¶
__all__ = [
"Registry",
"get_buffer_class",
"get_chunk_key_encoding_class",
"get_codec_class",
"get_ndbuffer_class",
"get_pipeline_class",
"register_buffer",
"register_chunk_key_encoding",
"register_codec",
"register_ndbuffer",
"register_pipeline",
]
__chunk_key_encoding_registry
module-attribute
¶
The registry module is responsible for managing implementations of codecs, pipelines, buffers, ndbuffers, and chunk key encodings and collecting them from entrypoints. The implementation used is determined by the config.
The registry module is also responsible for managing dtypes.
__codec_registries
module-attribute
¶
Registry ¶
Bases: dict[str, type[T]], Generic[T]
Source code in zarr/registry.py
fully_qualified_name ¶
get_buffer_class ¶
Source code in zarr/registry.py
get_chunk_grid_class ¶
Source code in zarr/registry.py
get_chunk_key_encoding_class ¶
Source code in zarr/registry.py
get_codec_class ¶
Source code in zarr/registry.py
get_ndbuffer_class ¶
Source code in zarr/registry.py
get_numcodec ¶
get_numcodec(data: CodecJSON_V2[str]) -> Numcodec
Resolve a numcodec codec from the numcodecs registry.
This requires the Numcodecs package to be installed.
Parameters:
-
data(CodecJSON_V2) –The JSON metadata for the codec.
Returns:
-
codec(Numcodec) –
Examples:
from zarr.registry import get_numcodec
codec = get_numcodec({'id': 'zlib', 'level': 1})
codec
# Zlib(level=1)
Source code in zarr/registry.py
get_pipeline_class ¶
get_pipeline_class(
reload_config: bool = False,
) -> type[CodecPipeline]
Source code in zarr/registry.py
register_buffer ¶
register_chunk_grid ¶
register_chunk_key_encoding ¶
register_codec ¶
register_ndbuffer ¶
register_pipeline ¶
register_pipeline(pipe_cls: type[CodecPipeline]) -> None