Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 1.54 KB

File metadata and controls

32 lines (19 loc) · 1.54 KB

PyBasket

Prototype API for time-series plot and METSIS basket functionality

Docker container serving a web application/API based on the fastapi python software library. The fastapi application and its configuration file are loaded at runtime from a mounted volume. (docker environment based on the alpine container from uvicorn-gunicorn-docker repository)

To start the service:

sudo docker run -p 5000:80 -v 'absolute-path-to'/metsis-deploy/volumes/fastapi/pybasket/config.yaml:/opt/basket/config.yaml -v 'absolute-path-to'/metsis-deploy/volumes/fastapi/pybasket/app:/app epinux/metsis-fastapi

Once started, the API description will be available at http://localhost:5000/docs#/default

NetCDF Plotting API

NetCDF data access is based on xarray. Plotting routines are based on bokeh. Assuming a NetCDF resource is available at resource_url

To test the plotting widget is possible to code the API call into an HTML file using fetch, see example.