Toloka documentation

get_projects

toloka.client.TolokaClient.get_projects | Source code

Finds all projects that match certain criteria.

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

If you need to sort projects use the find_projects method.

Parameters Description

Parameters Type Description
status Optional[Project.ProjectStatus]

Project status. Refer to the ProjectStatus page for more information on the available status values.

id_lt Optional[str]

Projects with IDs less than the specified value.

id_lte Optional[str]

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

id_gt Optional[str]

Projects with IDs greater than the specified value.

id_gte Optional[str]

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

created_lt Optional[datetime]

Projects created before the specified date.

created_lte Optional[datetime]

Projects created before or on the specified date.

created_gt Optional[datetime]

Projects created after the specified date.

created_gte Optional[datetime]

Projects created after or on the specified date.

  • Yields:

    The next matching project.

  • Yield type:

    Generator[Project, None, None]

Examples:

Get all active projects.

active_projects = toloka_client.get_projects(status='ACTIVE')

Get all your projects.

my_projects = toloka_client.get_projects()