Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Hivemind utility functions

These functions provide lightweight wrappers around the Hivemind API calls.

They handle construction of HTTP requests, pagination of results, and the pairing up of output data with corresponding input data. Apart from that they do nothing complicated at all, and can be used as a template for constructing your own more complicated API calls.

Version history can be viewed at HISTORY.md.

Example usage:

>>> from hivemindutil import hm
>>> hm.help('dataset')
- getDatasetRows(datasetId, baseUrl, apiKey, queries=[])
Returns Dataset Rows for a dataset in the workflows tab.  Queries can be supplied as a list of strings where each string defines a (1) key path, (2) logical comparison and (3)value (e.g. "metadata.timestamp=2021-01-01" or "data.path.to.my.key>=0").


- getDatasetRow(datasetId, baseUrl, apiKey, datasetRowId)
Returns a specified row of a dataset.


- deleteDatasetRows(datasetId, baseUrl, apiKey, datasetRowIds=[], allRows=False, raiseForStatus=True)
Deletes specified rows in a dataset.  If allRows is set to True, the values passed to datasetRowIds are ignored, and all dataset rows are identified and deleted.


- addDatasetRows(datasetId, baseUrl, apikey, rowsData=[])
Bulk add rows to a dataset.  The value of rowsData should be a list of dictionaries of the rows data.


- addDatasetRow(datasetId, baseUrl, apiKey, rowData={})
Add a single row to a dataset.  Value for rowData should be the dictionary of the row data object.

>>> r = addDatasetRow(1, 'https://studio.lambda.hvmd.io', 'API-XXXXXXXXXXXXXXXXXXXXXXXX', rowData={'foo': 'bar'})
>>> r
{
  'data': {
    'datasetRowId': 1,
    'datasetId': 1,
    'data': {'foo': 'bar'},
    'metadata': {'creator': {'id': 0, 'type': 'User'},
      'upstream': [],
      'timestamp': '2021-08-10T15:26:47.2433333Z',
      'sequenceId': 1,
      'version': 1
    }
  }
}

Release files for hivemind-util 0.1b44

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for hivemind-util 0.1b44
File Interpreter ABI Platform
hivemind_util-0.1b44-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / hivemind_util-0.1b44-py2.py3-none-any.whl

Download URL hivemind_util-0.1b44-py2.py3-none-any.whl
Size 12.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d6f2af343baf82df9b9396ff840c35e224e4880f4bb8b57782d8616cfad57d09
BLAKE2b-256 checksum
How to use checksums
ab9507d4239a5c599b9803774e5864c9cea1e3c676f8ad69acf41e067843f9e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1b44 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page