Clone pool

Create a copy of an existing pool preserving the main parameters.

Steps to follow

1. Import Toloka-Kit

Connect the Toloka-Kit library to your script.

import toloka.client as toloka

2. Instantiate TolokaClient

Replace the sample API key with your own one.

toloka_client = toloka.
TolokaClient
('PlaceYourRealApiKey_Here', 'PRODUCTION');

3. Clone pool

Find out the ID of the pool which you want to clone. Then clone this pool calling the clone_pool() method.

cloned_pool = toloka_client.
clone_pool
('32267581')

4. Print created pool ID

The clone_pool() request will return the Pool class object. You can use its attributes to print the information you need.

print(new_pool.id)

You should get an output with the created pool ID which looks like this.

1440972

Complete code: Clone pool

import toloka.client as toloka
toloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION')
cloned_pool = toloka_client.clone_pool('32267581')
print(cloned_pool.id)
List of classes and methods used in this recipe

See also

Last updated: February 7, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming