Assign an existing skill to Tolokers an set its level.
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');
from decimal import Decimal
user_skill = toloka_client.(
user_id='1ad097faba0eff85a04fe30bc04d53db',
skill_id='11051', value=Decimal(50)
)
The set_user_skill()
request will return the UserSkill class object. You can use its attributes to print the information you need.
print(user_skill.id, user_skill.skill_id, user_skill.user_id, user_skill.value)
You should get an output with the ID of the skill-Toloker pair (this allows removing skills from Tolokers later), assigned skill ID, Toloker ID, and the skill level the Toloker received which looks like this.
54132692 12648 1ad097faba0eff85a04fe30bc04d53db 50
import toloka.client as tolokafrom decimal import Decimaltoloka_client = toloka.TolokaClient('AQC2AGAJgyNSA8CtpdO9MWy_QEB6s6kDjHUoElE', 'PRODUCTION')user_skill = toloka_client.set_user_skill( user_id='1ad097faba0eff85a04fe30bc04d53db', skill_id='12648', value=Decimal(50))print(user_skill.id, user_skill.skill_id, user_skill.user_id, user_skill.value)