Toloka documentation

ProjectSortItems

toloka.client.search_requests.ProjectSortItems

ProjectSortItems(self, items=None)

Keys for sorting projects in search results.

Parameters Description

Parameters Type Description
items Optional[List[SortItem]]

A list of sorting keys. Supported values:

  • 'id' — A project ID.
  • 'created' — A project creation date.
  • 'public_name' — A project name.
  • 'private_comment' — A project private comment.

Examples:

The example shows how to find active projects sorted by names in descending order. Projects with equal names are sorted by IDs in ascending order.

sort = toloka.client.search_requests.ProjectSortItems(['-public_name', 'id'])
result = toloka_client.find_projects(status='ACTIVE', sort=sort, limit=50)