Skip to main content

HDF5 Tree Exporter

HDF5 exporter plugin for vcti-tree-exporter: writes a vcti tree to an .h5 file (groups, datasets, attributes).

HdfExporter serializes any vcti-tree tree whose node payloads are vcti-datanode DataNodes to a single HDF5 file. It satisfies the vcti.tree.exporter.core.Exporter protocol and ships a get_exporter_descriptor() factory, so a consumer registers it in a catalog and resolves it by id ("hdf5") or by attribute lookup.

Installation

pip install vcti-tree-exporter-hdf5

This pulls in vcti-tree-exporter (the protocol/catalog) and h5py.

Tree → HDF5 mapping

Tree node HDF5 object
internal node (has children) HDF5 group
data leaf (node.load() yields an array) HDF5 dataset (plain or, for a structured array, compound)
metadata-only leaf (no data, no children) HDF5 group with attributes
a node's node.name the group/dataset name (falls back to node_<index>)
a node's node.attributes HDF5 attributes on the group/dataset

A node's structural name comes from node.name (the vcti-datanode intrinsic), and its free-form node.attributes are written verbatim — intrinsic identity lives in its own namespace, so nothing needs filtering. NumPy Unicode (U<n>) fields inside a compound dtype are stored as h5py variable-length UTF-8 strings (h5py has no fixed-width Unicode in compound types). Attribute values are coerced for h5py (bytes decoded, numpy scalars via .item()); anything h5py can't store natively falls back to its str().

Usage

from pathlib import Path
from vcti.tree.exporter.core import build_registry, get_exporter
from vcti.tree.exporter.hdf5 import get_exporter_descriptor

registry = build_registry([get_exporter_descriptor()])   # plus any other format plugins
get_exporter(registry, "hdf5").export(tree, Path("model.h5"), overwrite=True)

Or use the exporter directly:

from vcti.tree.exporter.hdf5 import HdfExporter
HdfExporter().export(tree, Path("model.h5"))

Dependencies

Metadata

Release files for vcti-tree-exporter-hdf5 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vcti-tree-exporter-hdf5 2.0.0
File Size Uploaded
vcti_tree_exporter_hdf5-2.0.0.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vcti-tree-exporter-hdf5 2.0.0
File Interpreter ABI Platform
vcti_tree_exporter_hdf5-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.1 kB

Release files / vcti_tree_exporter_hdf5-2.0.0.tar.gz

Download URL vcti_tree_exporter_hdf5-2.0.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
12f64fe7ae389198f91643a3462f7a4566e4d9e5c100d55062f5106ec0ca77ee
BLAKE2b-256 checksum
How to use checksums
033d3b22948c6b9a9c540ddcadeb7d06ec015bb2116785d186b5e485ce0fa259
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 27, 2026.

Transparency log

Release files / vcti_tree_exporter_hdf5-2.0.0-py3-none-any.whl

Download URL vcti_tree_exporter_hdf5-2.0.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8df45c7216793e65cd7dd787b69e77a1b8c492121c41b014a0111a61423351a
BLAKE2b-256 checksum
How to use checksums
1aff8d804edb5ad10def627bf074ce4167530ba461555035ccdf20e34d0797f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page