toloka.client.TolokaClient.get_operations
| Source code
Finds all operations that match certain criteria.
get_operations
returns a generator. You can iterate over all found operations using the generator. Several requests to the Toloka server are possible while iterating.
If you need to sort operations use the find_operations method.
Parameters | Type | Description |
---|---|---|
type | Optional[OperationType] | Operation type. Refer to the OperationType page for more information on the available |
status | Optional[Operation.Status] | The status of the operation. Refer to the Operation.Status page for more information on the available |
id_lt | Optional[str] | Operations with IDs less than the specified value. |
id_lte | Optional[str] | Operations with IDs less than or equal to the specified value. |
id_gt | Optional[str] | Operations with IDs greater than the specified value. |
id_gte | Optional[str] | Operations with IDs greater than or equal to the specified value. |
submitted_lt | Optional[datetime] | Operations submitted before the specified date. |
submitted_lte | Optional[datetime] | Operations submitted before or on the specified date. |
submitted_gt | Optional[datetime] | Operations submitted after the specified date. |
submitted_gte | Optional[datetime] | Operations submitted after or on the specified date. |
finished_lt | Optional[datetime] | Operations finished before the specified date. |
finished_lte | Optional[datetime] | Operations finished before or on the specified date. |
finished_gt | Optional[datetime] | Operations finished after the specified date. |
finished_gte | Optional[datetime] | Operations finished after or on the specified date. |
batch_size | Optional[int] | A limit of items returned by each request to Toloka. The maximum allowed value: 500. The default value: 50. |
Yields:
The next matching operation.
Yield type:
Generator[Operation, None, None]
Examples:
some_operations = list(toloka_client.get_operations(submitted_lt='2023-06-01T00:00:00'))
Last updated: August 28, 2023