viewh5
Read-only, keyboard-first HDF5 viewer built with Textual.
Install
uv tool install viewh5
Or install the latest version directly from GitHub:
uv tool install --from git+https://github.com/kabilan108/viewh5 viewh5
Run it with viewh5 open path/to/file.h5.
For a non-interactive summary, use:
viewh5 describe path/to/file.h5
Yazi Previews
viewh5 can be used as both the HDF5 opener and the previewer in Yazi. The preview flow is built around piper.yazi, which runs viewh5 describe and shows the resulting text in Yazi's preview pane.
- Install
viewh5so theviewh5command is on yourPATH.
uv tool install viewh5
- Install the
piper.yaziplugin:
ya pkg add yazi-rs/plugins:piper
- Add the opener and preview rules to
~/.config/yazi/yazi.toml:
[opener]
h5 = [
{ run = 'viewh5 open "$@"', block = true, desc = "View HDF5 file" },
]
[open]
prepend_rules = [
{ url = "*.h5", use = [ "h5" ] },
{ url = "*.hdf5", use = [ "h5" ] },
{ url = "*.hdf", use = [ "h5" ] },
]
[plugin]
prepend_previewers = [
{ url = "*.h5", run = 'piper -- viewh5 describe --width "$w" --height "$h" "$1"' },
{ url = "*.hdf5", run = 'piper -- viewh5 describe --width "$w" --height "$h" "$1"' },
{ url = "*.hdf", run = 'piper -- viewh5 describe --width "$w" --height "$h" "$1"' },
]
After restarting Yazi, open on an HDF5 file will launch the full Textual app and hovering an HDF5 file will show the text summary in the preview pane.
Home Manager Setup
If you manage Yazi with Home Manager, the relevant configuration looks like:
programs.yazi = {
enable = true;
enableBashIntegration = true;
plugins = {
piper = pkgs.yaziPlugins.piper;
};
settings = {
opener = {
h5 = [
{ run = ''viewh5 open "$@"''; block = true; desc = "View HDF5 file"; }
];
};
open = {
prepend_rules = [
{ url = "*.h5"; use = [ "h5" ]; }
{ url = "*.hdf5"; use = [ "h5" ]; }
{ url = "*.hdf"; use = [ "h5" ]; }
];
};
plugin = {
prepend_previewers = [
{ url = "*.h5"; run = ''piper -- viewh5 describe --width "$w" --height "$h" "$1"''; }
{ url = "*.hdf5"; run = ''piper -- viewh5 describe --width "$w" --height "$h" "$1"''; }
{ url = "*.hdf"; run = ''piper -- viewh5 describe --width "$w" --height "$h" "$1"''; }
];
};
};
};
After rebuilding Home Manager, open on an HDF5 file will launch the full Textual app and hovering an HDF5 file will show the text summary in Yazi's preview pane.
Development
uv sync
uv run pytest
uv run ruff check
uv run ty check
uv run viewh5 open data/1520.h5
vhs assets/viewh5-demo.tape
To update snapshots after making changes to the TUI:
uv run pytest tests/test_snapshots.py --snapshot-update
To recreate the demo, make sure the project environment is synced and data/waveforms.h5 is present, then run vhs assets/viewh5-demo.tape.
Metadata
Release files for viewh5 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| viewh5-0.3.2.tar.gz | 596.2 kB | Without provenance | Details for viewh5-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| viewh5-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for viewh5-0.3.2-py3-none-any.whl |
Total release size: 625.9 kB
Release files / viewh5-0.3.2.tar.gz
| Download URL | viewh5-0.3.2.tar.gz |
|---|---|
| Size | 596.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06560db404431d5d1d17aec0cf088ef23d8790bbe81bd99c7641e020250a4592
|
|
BLAKE2b-256 checksum How to use checksums |
0b9f23d6c1513a2535f1e0e3aaa6897ff3562b607aaaa7ff1f1aa126a3a68901
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / viewh5-0.3.2-py3-none-any.whl
| Download URL | viewh5-0.3.2-py3-none-any.whl |
|---|---|
| Size | 29.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
929dc9a8f6b299dabd7c7ff5285656a437d5595eb03de8961e332282711906eb
|
|
BLAKE2b-256 checksum How to use checksums |
cfbb9ccc2941e8fd01e11b7f9692f597302fc1ba4cf796e5e104e2d9847e9431
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for viewh5 0.3.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.