tiled.adapters.hdf5.HDF5Adapter

class tiled.adapters.hdf5.HDF5Adapter(node: Any, *, structure: ArrayStructure | None = None, metadata: Dict[str, str | int | float | bool | Dict[str, Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]] | List[Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]]] | None = None, specs: List[Spec] | None = None, access_policy: AccessPolicy | None = None)[source]

Read an HDF5 file or a group within one.

This map the structure of an HDF5 file onto a “Tree” of array structures.

Examples

From the root node of a file given a filepath

>>> import h5py
>>> HDF5Adapter.from_uri("file://localhost/path/to/file.h5")

From the root node of a file given an h5py.File object

>>> import h5py
>>> file = h5py.File("path/to/file.h5")
>>> HDF5Adapter.from_file(file)

From a group within a file

>>> import h5py
>>> file = h5py.File("path/to/file.h5")
>>> HDF5Adapter(file["some_group']["some_sub_group"])
__init__(node: Any, *, structure: ArrayStructure | None = None, metadata: Dict[str, str | int | float | bool | Dict[str, Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]] | List[Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]]] | None = None, specs: List[Spec] | None = None, access_policy: AccessPolicy | None = None) None[source]
Parameters:
node
structure
metadata
specs
access_policy

Methods

__init__(node, *[, structure, metadata, ...])

from_file(file, *[, structure, metadata, ...])

from_uri(data_uri, *[, structure, metadata, ...])

get(k[,d])

inlined_contents_enabled(depth)

items()

keys()

metadata()

read([fields])

search(query)

structure()

values()

Attributes

access_policy

items_indexer

keys_indexer

structure_family

values_indexer

fn