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, ...])

Parameters:

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

Parameters:

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

Parameters:

get(k[,d])

inlined_contents_enabled(depth)

Parameters:

items()

Returns:

keys()

Returns:

metadata()

Returns:

read([fields])

Parameters:

search(query)

Parameters:

structure()

Returns:

values()

Returns:

Attributes

access_policy

Returns:

items_indexer

Returns:

keys_indexer

Returns:

structure_family

values_indexer

Returns:

fn