This repo includes python driver and app templates with databox-python library with basic APIs. Copy lib folder in your application directory and import lib in your driver/app python file.
import lib as databox
from databox.core_store import NewKeyValueClient as nkvClient
from databox.core_store import NewTimeSeriesClient as ntsClient
Databox python library provides following funtions:
URL: /kv// Method: POST Parameters: JSON body of data, replace and with a string Notes: store data using given key
nkvClient.write(id, key, payload, contentFormat)
URL: /kv// Method: GET Parameters: replace and with a string Notes: return data for given id and key
nkvClient.read(id, key, contentFormat)
URL: /ts/ Method: POST Parameters: JSON body of data, replace with a string Notes: add data to time series with given identifier (a timestamp will be calculated at time of insertion)
ntsClient.write(id, payload, contentFormat)
URL: /ts//latest Method: GET Parameters: replace with an identifier Notes: return the latest entry
ntsClient.latest(id, contentFormat)
The usecases of these functions for the test purpose included in the Sample Driver and the sample App.