Skip to main content

Explore HDF5 files in an HTML view

Project description

H5Glance lets you explore HDF5 files in the terminal or an HTML interface.

https://travis-ci.org/European-XFEL/h5glance.svg?branch=master

Install it with:

pip install h5glance

In the terminal, you can get a tree view of a file:

$ h5glance sample.h5
sample.h5
└path
  └inside
    └file   [float64: 100 × 100]

The names of datasets, groups and links are colour-coded by default. If you want to disable this, set the environment variable H5GLANCE_COLORS=0.

Inspect a group or dataset inside it:

$ h5glance sample.h5 path/inside/file
sample.h5/path/inside/file
      dtype: float64
      shape: 100 × 100
   maxshape: 100 × 100
     layout: Contiguous

sample data:
[[-0.27756437  0.36923643 -0.28113527 ...

In bash & zsh, h5glance offers tab-completion for the paths inside HDF5 files. To set this up, run:

python -m h5glance.completer

Alternatively, use - as the second argument, and h5glance will prompt you for the object path with tab completion:

$ h5glance sample.h5 -
Object path: sample.h5/  # try tapping tab

HTML interface

The HTML interface lets you inspect HDF5 files in a Jupyter Notebook. Demo.ipynb shows how to use it.

Why H5Glance?

There are plenty of other tools to view HDF5 files, including HDFView and ViTables, as well as various web-based viewers in development. Why might you choose H5Glance?

  • Practical terminal interface: if you’re working in a terminal, it’s much quicker to use something there than to start a GUI application and click through it.

    • Tab completions are part of this - take a moment to set them up (see above).

  • Static Jupyter views: H5Glance shows your HDF5 objects in simple HTML, which doesn’t talk to the server. Export your notebook to HTML, or view it on nbviewer, and the H5Glance view is still there.

  • Deeply nested structure: It was written at European XFEL, where data files can easily have 6 layers of nested groups. It tries to make working with that easy.

Some things it’s not designed for:

  • Viewing data: The terminal interface can show raw data, but it focuses on the structure of HDF5 files, not their content. H5Glance won’t show you plots or images.

  • Machine-readable output: It’s meant for people, not programs. In Python, your code can use h5py. For shell pipelines, use tools like h5ls and h5dump.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

h5glance-0.8.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

h5glance-0.8-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file h5glance-0.8.tar.gz.

File metadata

  • Download URL: h5glance-0.8.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for h5glance-0.8.tar.gz
Algorithm Hash digest
SHA256 179b768d8961b26b06c902e550ffd152da29261d85ee7a6b873dd297932c7092
MD5 cec626a9f4de0776529770ac807e0dd2
BLAKE2b-256 d4a5acc1b9974153d425b0a59f6f3306d954753b0b91d48b06fc9303d5815d32

See more details on using hashes here.

File details

Details for the file h5glance-0.8-py3-none-any.whl.

File metadata

  • Download URL: h5glance-0.8-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for h5glance-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1ab87496e61ae8ec781462105b80c00a0415487e431c4b5df7db01dea9449550
MD5 7e80edf7510bb954c1ee489f84cf1287
BLAKE2b-256 1eaad784bd2816e24820de1f51284a4127b25767df8948bcdab310b42796e721

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page