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]'


When using kolena, sessions are automatically authenticated using any token present in the KOLENA_TOKEN environment variable or in your .netrc file.

To get an API token, visit the Developer page to generate a token, then set the KOLENA_TOKEN variable in your environment:

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

By default, sessions are automatically initialized when a function requiring initialization is called. To configure your session, e.g. to disable extra logging via verbose=False, you can manually initialize by calling kolena.initialize(...) directly:

import kolena


By default, sessions have static scope and persist until the interpreter is exited. See the documentation on initialize for details.

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