Client library for accessing RecordKeepers Receiver
Project description
Context
RecordKeeper (abbreviated to RK) is aimed at two broad goals:
-
Explaining why something happened in your platform. Common example that we want to support is: why event X happened at time T? What Models were used? Who trained them, using training data ingested from which datasources? It achieves it by creating graph of events.
-
Recreating platform state at that time.
Basics
RKClient library is used to create events (PEMS) and inform RK about them.
You will need a running RecordKeeper Event Receiver to be able to work with it.
Recommended usage:
emitter_id = uuid.UUID('..some static uuid..')
rk_host = os.environ.get('RK_HOST')
rk_client = RKClientFactory.get(rk_host, emitter_id)
By using factory, automatically when RK_MOCK=true
env variable will be defined,
the returned client will fake the connections and return only success codes.
Details
The Receiver will be configured with max PEM payload size. If your PEM exceeds this limit, it will be rejected (with explanation).
You can query for the PEM limit size in get_info()
, in pem_size_limit
field.
RKClient from Python console
cd rkclient/
python3
>>> from rkclient import RKAdmin
>>> rk = RKAdmin('http://127.0.0.1:8082')
>>> pems, msg, ok = rk.get_pems()
>>> assert ok, msg
>>> for pem in pems:
>>> print(pem)
RKClient is part of ERST Recordkeeper repository.
RKClient is licensed with GNU General Public License version 3 or later, see LICENSE file for details.
Recordkeeper is ERST's implementation of the Context Cartographer specification.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for RecordKeeper_Client-1.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd30a4bdb248db80832df61174a147cd80890a89e9a530186cabb74b68f01f85 |
|
MD5 | c3f6d76e2bbf42bf2da273b93533fe79 |
|
BLAKE2b-256 | 006a4a8d8385026e0150e0f8e8c57ef0263fd4e106965e7940fa4a7f32ef38fa |
Hashes for RecordKeeper_Client-1.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feb7c44cda575b3818b8bea783698991d8a4b4a1adef31a4329c526c7589c945 |
|
MD5 | 6a65c9c520eab420430d0a83e4384c61 |
|
BLAKE2b-256 | 49dee7656fd8596ad9b70e1998479a7e85638dea8b1a97239fbcaa751b8e26d4 |