Skip to main content

Utilities to support the nh5 file format

Project description

nh5

nh5 is a Python package to support a new file format, .nh5, which stands for "not hdf5". This project aims to simplify and improve the loading of data in web applications, particularly for visualization purposes.

This package has an very small codebase. Feel free to explore!

Motivation behind nh5

The creation of this format was driven by specific challenges encountered with the hdf5 format, particularly in the context of web-based applications. While hdf5 is efficient for packaging large volumes of data, including data arrays, it falls short in terms of efficiency and ease when it comes to reading data from a web browser or from remote files. This inefficiency is primarily due to the scattered nature of metadata within the hdf5 file, necessitating multiple HTTP requests for access.

Simplified Data Access: Unlike hdf5, where metadata can be dispersed throughout the file, nh5 starts with a straightforward JSON text header. This header contains all the necessary attributes and metadata about the data arrays and can be loaded in one shot by the browser.

Predefined Data Structure: While hdf5 allows appending to an existing file, nh5 assumes that data is known in advance and needs to be packaged for visualization in web applications.

Installation

You can install nh5 using pip

pip install nh5

Usage

To convert an hdf5 file to an nh5 file, use the h5_to_nh5 function:

from nh5 import h5_to_nh5

h5_to_nh5("path_to_your_hdf5_file.h5", "path_for_the_output_nh5_file.nh5")

Limitations

  • Limited data types: Does not support all hdf5 data types.
  • No compression support: Currently, the nh5 format does not support data compression.

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Licensing

The code in this project is licensed under Apache License 2.0.

Author

The package and format were created by Jeremy Magland

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

nh5-0.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

nh5-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file nh5-0.1.1.tar.gz.

File metadata

  • Download URL: nh5-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.9.18 Linux/6.5.6-76060506-generic

File hashes

Hashes for nh5-0.1.1.tar.gz
Algorithm Hash digest
SHA256 710d7d16ff6d681904e648bd1470550033574fbe0afcff0c78d4dc39d73654db
MD5 056d78057aaf0a3cdbd61429322a9821
BLAKE2b-256 bd5cd0fdda093753f6fd32f0ee226d5d3e0666698cb91d5106fcb3325aa3ed2f

See more details on using hashes here.

File details

Details for the file nh5-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nh5-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.9.18 Linux/6.5.6-76060506-generic

File hashes

Hashes for nh5-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f4bb0c0688aebb2d056d224d6a8f71645b527a14cb9bad4af8dbb6a027baeda
MD5 4910b1c9b4db96fea8e886b517c1a965
BLAKE2b-256 bf54c14abcc4d7e93cfeaf445a4f84699d2e1f65fa9f5cebc0195d9a0272e1dc

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