Skip to main content

Quickstart

Kognic provides a client called kognic-io to simplify calling our APIs using Python.

Installation

Install via pip:

Install kognic-io for the most common use cases like file uploads and project management. bash pip install --upgrade kognic-io

Generating credentials

In the main platform, credentials can be generated by clicking here in the user menu.

Generate API credentials app screenshot

Setting credentials

Set the environment variable KOGNIC_CREDENTIALS to point to it.

export KOGNIC_CREDENTIALS=~/path/to/credentials.json

Verify credentials

To verify that they are correct you can simply list projects in Python:

note

Since kognic-io v2.4.0 you can provide a workspace id that will be used for writes. For users with multiple workspaces this will be mandatory. See this page for instructions.

from kognic.io.client import KognicIOClient

client = KognicIOClient()
client.project.get_projects()
print("success")

You should now be set up to interact with the Kognic Platform.

Next step