Restriction

toloka.client.actions.Restriction | Source code

Restriction(
self,
*,
scope: Union[UserRestriction.Scope, str, None] = None,
duration_days: Optional[int] = None,
private_comment: Optional[str] = None
)

Restricts Toloker's access to projects or pools.

To have better control over restriction period use RestrictionV2.

Parameters Description

ParametersTypeDescription
scopeUnion[UserRestriction.Scope, str, None]
  • POOL — A Toloker can't access the pool if the action is applied.
  • PROJECT — A Toloker can't access the entire project containing the pool.
  • ALL_PROJECTS — A Toloker can't access any requester's project.
duration_daysOptional[int]

A blocking period in days. If the duration_days is omitted, then the block is permanent.

private_commentOptional[str]

A private comment. It is visible only to the requester.

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