An easy-to-use CLI tool for exploring and printing HDF5 file hierarchy and dataset structures safely.
- Tree Hierarchy Display: Recursively explore groups, subgroups, and datasets.
- Multiple Output Formats: Supports
text,json, and colorful terminaltreeviews 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 / --saveor export schema to.json.
# 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 -suv run --with pytest pytest- 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)