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.
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)
Releasing package on PIP
Initial setup
pip install twine wheel
Register at https://test.pypi.org/account/register/ and https://pypi.org/account/register/,
confirm email. Then add to file ~/.pypirc
:
[testpypi]
username: MyUsername
password: MyPassword
[pypi]
username: MyUsername
password: MyPassword
Release
- Adjust version number in
VERSION.txt
- Document changes in
releases.txt
- Prepare build:
make release-prepare
- Upload to test PyPi:
make release-test
It might ask for password. Test that RKClient can be installed and that it works fine:
pip install -i https://test.pypi.org/simple/ RecordKeeper-Client==1.1.6 -v
- Use
make release
to upload to real PIP. Now client is available at: https://pypi.org/project/RecordKeeper-Client/ and can be installed with justpip install RecordKeeper-Client
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.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7878d9d9e178d9950efa0f0470027c0111353e81be3f9038eaecbe4b0a273f0 |
|
MD5 | d60d4255763b6ae3b011b1ae7a427d61 |
|
BLAKE2b-256 | e69ff4aea15fe19b3b947c7e47a5b3f4c9f9f52832cf32d7cc17211253382feb |
Hashes for RecordKeeper_Client-1.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e337716d237b1e898b0c34ab234154831d5fa17f8b9796e365e01012a14cd44 |
|
MD5 | 2e2a990c944d7cdf9d0e6cdcc46cc79f |
|
BLAKE2b-256 | 89ff38c958e6c32ab501c1683b467de4c4f4276a59a9ae5931021d78c5585eb7 |