Toloka documentation

Income

toloka.client.collectors.Income | Source code

Income(self, *, uuid: Optional[UUID] = None)

Counts Toloker's daily earnings in the pool.

Helpful when you need to:

  • Get responses from as many Tolokers as possible.

The collector can be used with conditions:

The collector can be used with actions:

Parameters Description

Parameters Type Description
uuid Optional[UUID]

The ID of a collector. Note that when you clone a pool, both pools start using the same collector, because it is not cloned. Usually, it is not an intended behavior. For example, in this case one collector gathers history size from both pools.

Examples:

The example shows how to block Toloker's access to the project for 1 day if their earnings reach 1 dollar.

new_pool = toloka.pool.Pool(....)
new_pool.quality_control.add_action(
    collector=toloka.collectors.Income(),
    conditions=[toloka.conditions.IncomeSumForLast24Hours > 1],
    action=toloka.actions.RestrictionV2(
        scope=toloka.user_restriction.UserRestriction.PROJECT,
        duration=1,
        duration_unit='DAYS',
        private_comment='Earnings limit is reached',
    )
)