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 OAuth token with your own one.
toloka_client = toloka.('AQC2AGAJgyNSA8CtpdO9MWy_QEB6s6kDjHUoElE', '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.('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('AQC2AGAJgyNSA8CtpdO9MWy_QEB6s6kDjHUoElE', 'PRODUCTION')cloned_pool = toloka_client.clone_pool('32267581')print(cloned_pool.id)