Skip to content

Installing kolena#

Testing on Kolena is conducted using the kolena Python package. You use the client to create and run tests from your infrastructure that can be explored in our web platform.

kolena is released under the open-source Apache-2.0 license. The package is hosted on PyPI and can be installed using your preferred Python package manager.


The first step to start testing with Kolena is to install kolena. Client builds can be installed directly from PyPI using any Python package manager such as pip or Poetry:

pip install kolena
poetry add kolena

Extra Dependency Groups#

Certain metrics computation functionality depends on additional packages like scikit-learn. These extra dependencies can be installed via the metrics group:

pip install 'kolena[metrics]'
poetry add 'kolena[metrics]'


Once you have kolena installed, initialize a session with kolena.initialize(api_token=token).

From the Developer page, generate an API token and set the KOLENA_TOKEN environment variable:

export KOLENA_TOKEN="********"

With the KOLENA_TOKEN environment variable set, initialize a client session:

import kolena


By default, sessions have static scope and persist until the interpreter is exited. Additional logging can be configured by specifying initialize(..., verbose=True).

Tip: logging

Integrate kolena into your existing logging system by filtering for events from the "kolena" logger. All log messages are emitted as both Python standard library logging events as well as stdout/stderr messages.

Supported Python Versions#

kolena is compatible with all active Python versions.

Python Version Compatible kolena Versions
3.12 ≥1.3
3.11 ≥0.69
3.10 All Versions
3.9 All Versions
3.8 All Versions
3.7 (EOL: June 2023) ≤0.99
3.6 (EOL: December 2021) ≤0.46