Python SDK

Currently, the best way to integrate your project via API is using our Python SDK. You can set up the SDK via either running $ pip install kern-python-client, or via cloning this repository and running $ pip install -r requirements.txt in your repository.

Usage

Once you installed the package, you can access the application from any Python terminal as follows:

from kern import Client

username = "your-username"
password = "your-password"
project_id = "your-project-id" # can be found in the URL of the web application

client = Client(username, password, project_id)
# if you run the application locally, please the following instead:
# client = Client(username, password, project_id, uri="http://localhost:4455")

Now, you can easily fetch the data from your project:

df = client.fetch_export()

The df contains data of the following scheme:

  • all your record attributes are stored as columns, e.g. headline or running_id if you uploaded records like {"headline": "some text", "running_id": 1234}
  • per labeling task three columns:
    • <attribute_name|None>__<labeling_task_name>__MANUAL: those are the manually set labels of your records
    • <attribute_name|None>__<labeling_task_name>__WEAK SUPERVISION: those are the weakly supervised labels of your records
    • <attribute_name|None>__<labeling_task_name>__WEAK SUPERVISION_confidence: those are the probabilities or your weakly supervised labels

With the client, you easily integrate your data into any kind of system; may it be a custom implementation, an AutoML system or a plain data analytics framework 🚀