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.7.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

h5glance-0.7-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for h5glance-0.7.tar.gz
Algorithm Hash digest
SHA256 8760e9b4d98886fd8c6354e3d75eea25001d7ad243ec05ea7abdd3bf8f474e1c
MD5 0b4efd27c8b3514ec4a36e3e52aa2039
BLAKE2b-256 7c2edbf9ba87fb62b4ccbb05188095b50491d97a06fd91fb5dec4a9b14f5af75

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for h5glance-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 11a1d894c98fc893278b2f6cce19c921fa69e4264262f959d29f3e77d96d8c4a
MD5 f7652aa47425d7f8183e5d4f45ced94e
BLAKE2b-256 452962dd07905e099c471bcfa4fcb4f0ff6716b86a1b194201f6d9b7731cb347

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