Skip to content

Getting started with the Kili Python SDK

Kili Character

What is Kili?

Kili is a platform that empowers a data-centric approach to Machine Learning through quality training data creation. It provides collaborative data annotation tools and APIs that enable quick iterations between reliable dataset building and model training. More info about the product here.

If you are looking for the Kili product documentation, it is located here.

The Kili Python SDK

Kili Python SDK has been designed to perform complex project-related tasks by using the Python programming language. Using Kili Python SDK, you can write scripts for repetitive tasks and then integrate them in one machine learning or data science workflow. For people who are familiar with Python, it may be perfect middle ground between complex GraphQL queries and simple, but less flexible CLI one-liners.

Requirements

You only need Python 3.7 or higher.

Installation

Install the Kili client with pip:

pip install kili

Usage

  • Create and copy a Kili API key
  • Add the KILI_API_KEY variable in your bash environment (or in the settings of your favorite IDE) by pasting the API key value that you copied earlier:
export KILI_API_KEY='<you api key value here>'
  • Instantiate the Kili client:
from kili.client import Kili
kili = Kili()

Great!

You can now begin to use the Kili Python SDK

Info

You can also pass the API key as an argument of the Kili initialization: python kili = Kili(api_key='<you api key value here>')