Change the priority of the pool and offer it to Tolokers before other pools.
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 for which you want to change the priority. Then call the patch_pool()
method.
patched_pool = toloka_client.patch_pool(pool_id='1443815', priority=0)
The patch_pool()
request will return the Pool class object. You can use its attributes to print the information you need.
print(patched_pool.id, patched_pool.priority)
You should get an output with the pool ID and the updated priority which looks like this.
1443815 0
import toloka.client as tolokatoloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION')patched_pool = toloka_client.patch_pool(pool_id='1443815', priority=0)print(patched_pool.id, patched_pool.priority)
Last updated: February 7, 2023