geo3d.io.database ================= .. py:module:: geo3d.io.database Classes ------- .. autoapisummary:: geo3d.io.database.HDF5Dataset geo3d.io.database.HDF5Group geo3d.io.database.HDF5Database Module Contents --------------- .. py:class:: HDF5Dataset(dataset: h5py._hl.dataset.Dataset) Class for a dataset (inside of a group) in an HDF5 database. .. py:attribute:: _dataset .. py:property:: name :type: str Return the name of the dataset. .. py:property:: data :type: numpy.typing.NDArray Return the data of the dataset. .. py:property:: attrs :type: Dict[str, Any] Return the attributes of the dataset. .. py:method:: __repr__() -> str Special method for representing the dataset. .. py:class:: HDF5Group(group: h5py._hl.group.Group) Class for a group in an HDF5 database. .. py:attribute:: _group .. py:property:: name :type: str Return the name of the group. .. py:property:: attrs :type: Dict[str, Any] Return the attributes of the group. .. py:method:: list_datasets() -> List[str] Return the list of datasets in a group. .. py:method:: get_dataset(name: str) -> h5py._hl.dataset.Dataset Return a dataset contained in a group. :param name: The name of the dataset. :type name: str :returns: The dataset. :rtype: (Dataset) .. py:method:: __iter__() -> Any Iterate over datasets as HDF5Dataset objects. .. py:method:: __repr__() -> str Special method for representing the dataset. .. py:class:: HDF5Database(filepath: str, mode: str = 'r') Class for creating an HDF5 database. .. py:attribute:: file .. py:method:: list_groups() -> List[str] Return all top-level groups in the database. .. py:method:: get_group(name: str) -> HDF5Group Return a group as an HDF5Group object. :param name: The name of the group. :type name: str :returns: The group in the database. :rtype: HDF5Group .. py:method:: __iter__() -> Any Iterate over groups as HDF5Group objects. .. py:method:: close() -> None Close the database. .. py:method:: __enter__() -> Any Special method to open the database as a context manager. .. py:method:: __exit__(exc_type, exc_value, exc_traceback) -> None Special method to close the database as a context manager. .. py:method:: __repr__() -> str Special method for representing the database.