Skip to main content

Toloka-Kit

License PyPI Latest Release Supported Versions Downloads

Coverage GitHub Tests

Toloka website | Documentation | Issue tracker

Toloka-Kit is a Python library for working with Toloka API.

The API allows you to build scalable and fully automated human-in-the-loop ML pipelines, and integrate them into your processes. The toolkit makes integration easier. You can use it with Jupyter notebooks.

  • Support for all common Toloka use cases: creating projects, adding pools, uploading tasks, and so on.
  • Toloka entities are represented as Python classes. You can use them instead of accessing the API using JSON representations.
  • There’s no need to validate JSON files and work with them directly.
  • Support of both synchronous and asynchronous (via async/await) executions.
  • Streaming support: build complex pipelines which send and receive data in real time. For example, you can pass data between two related projects: one for data labeling, and another for its validation.
  • AutoQuality feature which automatically finds the best fitting quality control rules for your project.

Prerequisites

Before you begin, make sure that:

Get Started

  1. Install the Toloka-Kit package. Run the following command in the command shell:
$ pip install toloka-kit

For production environments, specify the exact package version. For the latest stable version, check the project page at pypi.org.

Note: Starting with v1.0.0 release only the core version of the package is installed by default. See the Optional dependencies section for the details.

If you are just starting to use Toloka-Kit, the core package is enough. Our docs explicitly state which features require other packages, so you can install them later if you need them.

  1. Check access to the API with the following Python script. The script imports the package, asks to enter the OAuth token, and requests general information about your account.
import toloka.client as toloka
from getpass import getpass


# Uncomment one of the following two lines to specify where to send requests to: sandbox or production version of Toloka
target = 'SANDBOX'
# target = 'PRODUCTION'

toloka_client = toloka.TolokaClient(getpass("Enter your token:"), target)
print(toloka_client.get_requester())

If the code above has not raised any errors or exceptions, it means that everything works correctly.

  1. Follow our Learn the basics tutorial to learn how to work with Toloka API using Toloka-Kit.

Optional dependencies

Run this command to install toloka-kit with all additional dependencies:

$ pip install toloka-kit[all]

To install specific dependencies, run:

$ pip install toloka-kit[pandas,autoquality,s3,zookeeper,jupyter-metrics] # remove unnecessary requirements from the list

Usage examples

Toloka-kit usage examples - tutorials for specific data labeling tasks. They demonstrate how to work with Toloka API using Toloka-Kit.

Documentation

Support

Contributing

Feel free to contribute to toloka-kit. Right now, we need more usage examples.

License

© Copyright 2023 Toloka team authors. Licensed under the terms of the Apache License, Version 2.0. See LICENSE for more details.

Metadata

Release files for toloka-kit 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toloka-kit 1.2.3
File Size Uploaded Provenance Actions
toloka_kit-1.2.3.tar.gz 298.3 kB Without provenance Details for toloka_kit-1.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toloka-kit 1.2.3
File Interpreter ABI Platform Actions
toloka_kit-1.2.3-py3-none-any.whl Python 3 none any Details for toloka_kit-1.2.3-py3-none-any.whl

Total release size: 700.4 kB

Release files / toloka_kit-1.2.3.tar.gz

Download URL toloka_kit-1.2.3.tar.gz
Size 298.3 kB
Tags Source
SHA-256 checksum
How to use checksums
abf131e64f6b8e5618899707c8bd1cf33f754bd1209dff36c7d4e3b6f8d28417
BLAKE2b-256 checksum
How to use checksums
2025d021fe479535ff72202c685935cc06e02337a67dc08db9e10320e4725cc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.18

Release files / toloka_kit-1.2.3-py3-none-any.whl

Download URL toloka_kit-1.2.3-py3-none-any.whl
Size 402.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f4b24a281371d8e2f62581af24a368a8f1a3a321879ebf3c419a294fe646b77
BLAKE2b-256 checksum
How to use checksums
a8ecbd855b4b7db041ddd217bc7d2c43ea5e80fa46f8492bb2b3006fb9e325a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.18

Security for toloka-kit 1.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page