Protocol
We define a Parser using the following Protocol so that external implementations can independently develop implementations that work with virtualizarr.open_virtual_dataset and virtualizarr.open_virtual_mfdataset.
All custom parsers must follow the virtualizarr.parsers.typing.Parser typing protocol.
You can add configuration options to your Parser implementation's __init__ method.
virtualizarr.parsers.typing.Parser ¶
Bases: Protocol
__call__ ¶
__call__(url: str, registry: ObjectStoreRegistry) -> ManifestStore
Parse the contents of a given data source to produce a ManifestStore.
Effectively maps the contents of the data source (including the metadata, compression codecs, chunk byte offsets) to the Zarr data model.
Parameters:
-
url(str) –The URL of the input data source (e.g., "s3://bucket/file.nc").
-
registry(ObjectStoreRegistry) –An ObjectStoreRegistry for resolving urls and reading data.
Returns:
-
ManifestStore–A ManifestStore which provides a Zarr representation of the parsed data source.