Toloka documentation

get_projects

toloka.client.TolokaClient.get_projects

Finds all projects that match certain rules and returns them in an iterable object

Unlike find_projects, returns generator. Does not sort projects. While iterating over the result, several requests to the Toloka server is possible.

Parameters Description

Parameters Type Description
status Optional[Project.ProjectStatus]

Status of the project, from Project.ProjectStatus:

  • ACTIVE
  • ARCHIVED

id_lt Optional[str]

Projects with an ID less than the specified value.

id_lte Optional[str]

Projects with an ID less than or equal to the specified value.

id_gt Optional[str]

Projects with an ID greater than the specified value.

id_gte Optional[str]

Projects with an ID 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 object corresponding to the request parameters.

  • 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()