find_tasks
toloka.client.TolokaClient.find_tasks
Finds tasks that match certain criteria.
The number of returned tasks is limited. find_tasks
additionally returns a flag showing whether there are more matching tasks.
Consider using get_tasks to iterate over all matching 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. |
sort |
Union[List[str], TaskSortItems, None] | Sorting options. Default value: |
limit |
Optional[int] | Returned tasks limit. The maximum value is 100,000. Default value: 50. |
-
Returns:
Found tasks and a flag showing whether there are more matching tasks.
-
Return type:
Examples:
To find three most recently created tasks in a pool, call the method with the following parameters:
toloka_client.find_tasks(pool_id='1', sort=['-created', '-id'], limit=3)