set_user_restriction

toloka.client.TolokaClient.set_user_restriction | Source code

set_user_restriction(self, user_restriction: UserRestriction)

Restricts access to projects or pools for a Toloker.

Parameters description

ParametersTypeDescription
user_restrictionUserRestriction

Restriction parameters.

Examples:

Restricting access to a project.

new_restriction = toloka_client.set_user_restriction(
toloka.client.user_restriction.ProjectUserRestriction(
user_id='fac97860c7929add8048ed2ef63b66fd',
private_comment='The Toloker often makes mistakes',
project_id='92694'
)
)

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming