HDFGroup / h5pyd

h5py distributed - Python client library for HDF Rest API
Other
109 stars 39 forks source link

Open in GitHub Codespaces

h5pyd

Python client library for HSDS

Introduction

This repository contains library, test, and examples of h5pyd - a Python package for HSDS (Highly Scalable Data Service), or other HDF REST compatible web services.

The h5pyd library provides a high-level interface to the REST specification that is generally easier to use than invoking http calls directly.

This package is based on the popular h5py package and aims to be source compatible with the h5py high level interface.

Websites

Related Projects

Installing

Via pip::

pip install h5pyd

From a release tarball or Git checkout::

pip install .

Run hsconfigure to setup the connection info (endpoint, username, and password) to HSDS.
If you don't have access to an HSDS instance, you can easily setup your own HSDS instance. See https://github.com/HDFGroup/hsds for instructions on installing and running HSDS on locally or in the cloud.

Alternatively, if you can run this repo as a Github Codespace (see "Open in a Github Codespace" link above), and HSDS will be automatically setup as part of the codespace.

Another option is to run h5pyd in serverless mode with either AWS Lambda or direct mode (storage system accessed directly).

To use with AWS Lambda, set the HS_ENDPOINT to: "http+lambda://hslambda" where "hslambda" is the name of the lambda function. When using AWS Lambda some additional environment variables need to be set:

To use in direct mode, set the HS_ENDPOINT to "local". For direct mode, some additional environment variables are needed to be defined:

To use "local" mode with S3, define these variables:

To use "local" mode with Azure, defined these variables:

To use "local" with Posix storage, define these variables:

H5PYD Command Line Apps

Several utility applications are included with this package:

Use the --help option to get usage information for each command.

Testing

By default the test suite will attempt to connect to a local instance of HSDS with the http://localhost:5101 endpoint.

Use the following environment variables as needed to modify the default configuration for the test suite:

Run: $python testall.py to execute the test suite.

Uninstalling

Just remove the install directory and all contents to uninstall.

Reporting bugs (and general feedback)

Create new issues at http://github.com/HDFGroup/h5pyd/issues for any problems you find.

For general questions/feedback, please use the HSDS forum (https://forum.hdfgroup.org/c/hsds).