Get list of pools

Get the list of the pools with the CLOSED status in your project.

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 OAuth token with your own one.

toloka_client = toloka.

3. List pools

Find out the ID of the project for which you want to get all the pools with the CLOSED status. Then iterate through all the pools calling the get_pools() method.

for pool in toloka_client.
(project_id='118252', status='CLOSED'):

print(, pool.status, pool.private_name)

You should get an output that contains the IDs of the pools, their statuses, and private names. It will look like this.

36502086 Status.CLOSED Pool 1
36756115 Status.CLOSED Pool 2

Complete code: Get list of pools

import toloka.client as toloka
toloka_client = toloka.TolokaClient('AQC2AGAJgyNSA8CtpdO9MWy_QEB6s6kDjHUoElE', 'PRODUCTION')
for pool in toloka_client.get_pools(project_id='118252', status='CLOSED'):
print(, pool.status, pool.private_name)
List of classes and methods used in this recipe

See also

OverviewGetting OAuth tokenQuick start
toloka.autoquality [autoquality]