find_pools

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 Description

ParametersTypeDescription
statusOptional[Pool.Status]

Pool status. Refer to the Pool.Status page for more information on the available status values.

project_idOptional[str]

Pools belonging to the project with the specified ID.

id_ltOptional[str]

Pools with IDs less than the specified value.

id_lteOptional[str]

Pools with IDs less than or equal to the specified value.

id_gtOptional[str]

Pools with IDs greater than the specified value.

id_gteOptional[str]

Pools with IDs greater than or equal to the specified value.

created_ltOptional[datetime]

Pools created before the specified date.

created_lteOptional[datetime]

Pools created before or on the specified date.

created_gtOptional[datetime]

Pools created after the specified date.

created_gteOptional[datetime]

Pools created after or on the specified date.

last_started_ltOptional[datetime]

Pools that were opened last time before the specified date.

last_started_lteOptional[datetime]

Pools that were opened last time before or on the specified date.

last_started_gtOptional[datetime]

Pools that were opened last time after the specified date.

last_started_gteOptional[datetime]

Pools that were opened last time after or on the specified date.

sortUnion[List[str], PoolSortItems, None]

Sorting options. Default: None.

limitOptional[int]

Returned pools limit. The default limit is 20. The maximum allowed limit is 300.

  • Returns:

    Found pools and a flag showing whether there are more matching pools exceeding the limit.

  • Return type:

    PoolSearchResult

Examples:

Finding all pools in all projects.

pools = toloka_client.find_pools()

Finding all open pools in all projects.

pools = toloka_client.find_pools(status='OPEN')

Finding open pools in a specific project.

pools = toloka_client.find_pools(status='OPEN', project_id='1')

If there are pools exceeding the limit, then pools.has_more is set to True.

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