Example implementations

Example implementations using FastAPI, Flask and Tornado are given in the example folder. These are functional backends that make use of the utilities provided by the h5grove package.

The endpoints API is described here.

FastAPI

FastAPI-based server sample code

usage: fastapi_app.py [-h] [-p PORT] [--ip IP] [--basedir BASEDIR]

Named Arguments

-p, --port

Port the server is listening on

Default: 8888

--ip

IP the server is listening on

Default: “localhost”

--basedir

Base directory from which to retrieve HDF5 files

Default: “.”

Flask

Flask-based server sample code

usage: flask_app.py [-h] [-p PORT] [--ip IP] [--compression]
                    [--basedir BASEDIR]

Named Arguments

-p, --port

Port the server is listening on

Default: 8888

--ip

IP the server is listening on

Default: “localhost”

--compression

Enable HTTP compression

Default: False

--basedir

Base directory from which to retrieve HDF5 files

Default: “.”

Tornado

Tornado-based server sample code

usage: tornado_app.py [-h] [-p PORT] [--ip IP] [--basedir BASEDIR]

Named Arguments

-p, --port

Port the server is listening on

Default: 8888

--ip

IP the server is listening on

Default: “localhost”

--basedir

Base directory from which to retrieve HDF5 files

Default: “.”