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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for h5glance-0.8.1.tar.gz
Algorithm Hash digest
SHA256 5afb44cd82af7d0cfd25e884aa15859ef6f0bb01e78a0a2589c0a0b5b207e26f
MD5 a16ad71a3ab5cc33e199153669e041a0
BLAKE2b-256 8292c645262c7cac89e7a5f9b652a2771473b26fe6708f933f394fdfa570637c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for h5glance-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6cd50f54308f312c1115b5675d41cecfb8d18c761603055882bd98702dfead9e
MD5 f1ff6d02e1f7850ebc95aeb743620f38
BLAKE2b-256 06b9dad7bddc279591c24493f3a7fa1e917b1b2baa8d7dee1f156e647101fd30

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