toloka.client.TolokaClient.find_pools
| Source code
Finds pools that match certain criteria.
The number of returned pools is limited. To find remaining pools call find_pools
with updated search criteria.
To iterate over all matching pools you may use the get_pools method.
Parameters | Type | Description |
---|---|---|
status | Optional[Pool.Status] | Pool status. Refer to the Pool.Status page for more information on the available |
project_id | Optional[str] | Pools belonging to the project with the specified ID. |
id_lt | Optional[str] | Pools with IDs less than the specified value. |
id_lte | Optional[str] | Pools with IDs less than or equal to the specified value. |
id_gt | Optional[str] | Pools with IDs greater than the specified value. |
id_gte | Optional[str] | Pools with IDs greater than or equal to the specified value. |
created_lt | Optional[datetime] | Pools created before the specified date. |
created_lte | Optional[datetime] | Pools created before or on the specified date. |
created_gt | Optional[datetime] | Pools created after the specified date. |
created_gte | Optional[datetime] | Pools created after or on the specified date. |
last_started_lt | Optional[datetime] | Pools that were opened last time before the specified date. |
last_started_lte | Optional[datetime] | Pools that were opened last time before or on the specified date. |
last_started_gt | Optional[datetime] | Pools that were opened last time after the specified date. |
last_started_gte | Optional[datetime] | Pools that were opened last time after or on the specified date. |
sort | Union[List[str], PoolSortItems, None] | Sorting options. Default: |
limit | Optional[int] | Returned pools limit. The maximum allowed value: 300. The default value: 20. |
Returns:
Found pools and a flag showing whether there are more matching pools exceeding the limit.
Return type:
Examples:
Finding all pools in all projects.
find_result = toloka_client.find_pools()pools = find_result.items
Finding all open pools in all projects.
find_result = toloka_client.find_pools(status='OPEN')pools = find_result.items
Finding open pools in a specific project.
find_result = toloka_client.find_pools(status='OPEN', project_id='92694')pools = find_result.items
If there are pools exceeding the limit
, then find_result.has_more
is set to True
.
Last updated: August 28, 2023