Create a copy of an existing pool preserving the main parameters.
Connect the Toloka-Kit library to your script.
import toloka.client as toloka
Replace the sample API key with your own one.
toloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION');
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')
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
import toloka.client as tolokatoloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION')cloned_pool = toloka_client.clone_pool('32267581')print(cloned_pool.id)
Last updated: February 7, 2023