Skip to content

About

a tool for displaying hierarchy data structure of hdf5

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

H5 Printer

An easy-to-use CLI tool for exploring and printing HDF5 file hierarchy and dataset structures safely.

H5Printer Terminal Demo

Features

  • Tree Hierarchy Display: Recursively explore groups, subgroups, and datasets.
  • Multiple Output Formats: Supports text, json, and colorful terminal tree views via -f / --format.
  • Metadata Inspection: Display shape, dtype, size, chunks, and compression parameters.
  • Safe Content Display: Automatic truncation for large arrays and long byte/string attributes.
  • Depth Control: Limit inspection depth using -d / --max-depth.
  • File Export: Save output reports directly using -s / --save or export schema to .json.

Installation & Usage

# Direct execution (standalone)
python h5printer.py dataSample/oneFrame.h5

# Output in JSON format
python h5printer.py dataSample/oneFrame.h5 -f json

# Or install with optional rich tree support for global CLI command
pip install -e ".[rich]"
h5printer dataSample/oneFrame.h5 -d 1 -f tree

# Save output to report file
h5printer dataSample/oneFrame.h5 -o report.txt -s
h5printer dataSample/oneFrame.h5 -o schema.json -f json -s

Running Tests

uv run --with pytest pytest

Roadmap

  • Finish the first draft
  • Add argument for setting desired print depth (-d / --max-depth)
  • Optimize CLI argument options and descriptions
  • Modernize type annotations and enhance dataset metadata
  • Modularize code structure (decouple parser and renderers)
  • Unit tests with pytest (12 passed)
  • Add rich terminal colored tree rendering (RichTreeRenderer)
  • Support JSON export format (JsonRenderer)

About

a tool for displaying hierarchy data structure of hdf5

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages