List Tolokers with skills

Get all the skills assigned to the Toloker with the ID specified in the request.

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. Print skill names, "skill-Toloker" pair IDs, and values

Get all the skills assigned to the selected Toloker using the get_user_skills() method. Then, iterate through all these found skills calling the get_skill() method.

for user_skill in toloka_client.
get_user_skills
(user_id='fac97860c7929add8048ed2ef63b66fd'):

skill = toloka_client.
get_skill
(user_skill.skill_id)

print(skill.name, user_skill.id, user_skill.value)

You should get an output with the skill names, "skill-Toloker" pair IDs, and values which looks like this.

Product Search Relevance 54116339 70
Programmer 54132692 50
Tip

The "skill-Toloker" pair ID allows you to get or remove the skill assigned to a specific Toloker.

Complete code: List Tolokers with skills

import toloka.client as toloka
toloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION')
for user_skill in toloka_client.get_user_skills(user_id='fac97860c7929add8048ed2ef63b66fd'):
skill = toloka_client.get_skill(user_skill.skill_id)
print(skill.name, user_skill.id, user_skill.value)
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