find_trainings

toloka.client.TolokaClient.find_trainings | Source code

Finds trainings that match certain criteria.

The number of returned trainings is limited. To find remaining trainings call find_trainings with updated search criteria.

To iterate over all matching trainings you may use the get_trainings method.

Parameters description

ParametersTypeDescription
statusOptional[Training.Status]

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

project_idOptional[str]

Training pools belonging to the project with the specified ID.

id_ltOptional[str]

Training pools with IDs less than the specified value.

id_lteOptional[str]

Training pools with IDs less than or equal to the specified value.

id_gtOptional[str]

Training pools with IDs greater than the specified value.

id_gteOptional[str]

Training pools with IDs greater than or equal to the specified value.

created_ltOptional[datetime]

Training pools created before the specified date.

created_lteOptional[datetime]

Training pools created before or on the specified date.

created_gtOptional[datetime]

Training pools created after the specified date.

created_gteOptional[datetime]

Training pools created after or on the specified date.

last_started_ltOptional[datetime]

Training pools that were opened last time before the specified date.

last_started_lteOptional[datetime]

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

last_started_gtOptional[datetime]

Training pools that were opened last time after the specified date.

last_started_gteOptional[datetime]

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

sortUnion[List[str], TrainingSortItems, None]

Sorting options. Default: None.

limitOptional[int]

Returned trainings limit. The maximum allowed value: 300.

  • Returns:

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

  • Return type:

    TrainingSearchResult

Examples:

Finding all trainings in all projects.

find_result = toloka_client.find_trainings()
trainings = find_result.items

Finding all opened trainings in all projects.

find_result = toloka_client.find_trainings(status='OPEN')
trainings = find_result.items

Finding all opened trainings in a specific project.

find_result = toloka_client.find_trainings(status='OPEN', project_id='92694')
trainings = find_result.items

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

Last updated: August 28, 2023

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