Skip to main content

A Jupyter Notebook server extension that provides APIs for fetching hdf5 contents and data. Built on h5py.

Project description

PyPI version npm_version

interactive api docs

jupyterlab-hdf5

Open and explore HDF5 files in JupyterLab. Can handle very large (TB) sized files. New in release v0.5.0, jlab-hdf5 can now open datasets of any dimensionality, from 0 to 32. Any 0D, 1D, or 2D slab of any dataset can easily be selected and displayed using numpy-style index syntax.

hdf_preview

Double clicking on an .hdf5 file in the file browser will open it in a special HDF browser. You can then browse through the groups and open the datasets in the .hdf5 file. All datasets will open read only.

For the moment, the browser context menu does not work with .hdf5 files/groups/datasets. Only double clicking is currently supported.

Designed from the ground up to be as efficient as possible. Data will only be fetched as needed to create the visible display. This allows the extension to work with very large files (tested working up to the TB range).

Installation

pip install jupyterlab_hdf
jupyter labextension install @jupyterlab/hdf5

This will install both the server extension and the labextension needed by this plugin.

You can also install the labextension via Jupyterlab's extension manager GUI. Keep in mind that if you use the lab extension GUI, you'll still need to install the jupyterlab_hdf server extension via pip.

Compression filters

The extension supports all compression filters supported by h5py: https://docs.h5py.org/en/stable/high/dataset.html#filter-pipeline.

To enable support for additional filters such as blosc or bitshuffle, you need to install hdf5plugin in addition to the extension:

pip install hdf5plugin

Development

For a development install, clone the repository and then run the following in the repo dir:

pip install -e .[dev]
jlpm build:dev

To watch for/rebuild on changes to this extension's source code, run:

jlpm run build:watch

What's in this extension

This extension has two main parts: an hdf5 filebrowser plugin, and an hdf5 dataset file type plugin.

HDF5 Filebrowser

Allows you to navigate an .hdf5 file's groups as though they were directories in a filesystem. Any .hdf5 file on a user's system can be opened by entering its path (relative to the Jupyterlab home directory) in the box at the top of the browser.

Note on link resolution

HDF5 files can contain links that point to entities in the same file (soft links) or to entities in a different files (external links). By default, the extension does not resolve such links.

Link resolution must be enabled explicitly by setting the config field HdfConfig.resolve_links to True. For this, there are two possibilities:

  • Set the config field when launching JupyterLab:
jupyter lab --HdfConfig.resolve_links=True
c.HdfConfig.resolve_links = True

Note that this will only resolve valid links. Broken links (e.g. links to a non-existent entity) will still appear as links.

HDF5 dataset file type

When you open a dataset using the hdf5 filebrowser, a document will open that displays the contents of the dataset via a grid.

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

jupyterlab_hdf-1.2.0.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

jupyterlab_hdf-1.2.0-py2.py3-none-any.whl (15.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file jupyterlab_hdf-1.2.0.tar.gz.

File metadata

  • Download URL: jupyterlab_hdf-1.2.0.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for jupyterlab_hdf-1.2.0.tar.gz
Algorithm Hash digest
SHA256 60a5b6808966d26af15f93c9339f81f1c194324fd94339d0bf700b5aa64f659d
MD5 f3daf04c99c9c46e44fb613249f69a0f
BLAKE2b-256 8de87a712a0a3aaf5ab2c7a134ea880c55f8bdf439ce0bcb1508ea366700c347

See more details on using hashes here.

File details

Details for the file jupyterlab_hdf-1.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: jupyterlab_hdf-1.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for jupyterlab_hdf-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6b71176ce2e6d68eed03288677929a0a115caae84540cd7d8efe54c971486309
MD5 9255eaa7397c7a711716bec3cf859a74
BLAKE2b-256 bbea1fc0f32cb776b6316d60a52ea85a42d599b0dc1030ac254e4d9202952598

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