Toloka documentation

get_tasks

toloka.client.TolokaClient.get_tasks

Finds all tasks that match certain criteria.

get_tasks returns a generator and you can iterate over all found tasks. Several requests to the Toloka server are possible while iterating.

Note that tasks can not be sorted. If you need to sort tasks use find_tasks.

Parameters Description

Parameters Type Description
pool_id Optional[str]

The ID of the pool to get tasks from.

overlap Optional[int]

Tasks with an overlap equal to the specified value.

id_lt Optional[str]

Tasks with an ID less than the specified value.

id_lte Optional[str]

Tasks with an ID less than or equal to the specified value.

id_gt Optional[str]

Tasks with an ID greater than the specified value.

id_gte Optional[str]

Tasks with an ID greater than or equal to the specified value.

created_lt Optional[datetime]

Tasks created before the specified date.

created_lte Optional[datetime]

Tasks created before or on the specified date.

created_gt Optional[datetime]

Tasks created after the specified date.

created_gte Optional[datetime]

Tasks created after or on the specified date.

overlap_lt Optional[int]

Tasks with an overlap less than the specified value.

overlap_lte Optional[int]

Tasks with an overlap less than or equal to the specified value.

overlap_gt Optional[int]

Tasks with an overlap greater than the specified value.

overlap_gte Optional[int]

Tasks with an overlap greater than or equal to the specified value.

  • Yields:

    An iterable with found tasks.

  • Yield type:

    Generator[Task, None, None]

Examples:

Getting all tasks from a single pool.

results_list = [task for task in toloka_client.get_tasks(pool_id='1')]