Toloka documentation

get_pools

toloka.client.TolokaClient.get_pools | Source code

Finds all pools that match certain criteria.

get_pools returns a generator. You can iterate over all found pools using the generator. Several requests to the Toloka server are possible while iterating.

If you need to sort pools use the find_pools method.

Parameters Description

Parameters Type Description
status Optional[Pool.Status]

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

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.

  • Yields:

    The next matching pool.

  • Yield type:

    Generator[Pool, None, None]

Examples:

How to get all open pools from a project.

open_pools = toloka_client.get_pools(project_id='1', status='OPEN')

How to get all pools from a project.

all_pools = toloka_client.get_pools(project_id='1')