Toloka documentation



AttachmentSortItems(self, items=None)

Parameters for sorting attachment search results

You can specify multiple parameters. To change the sorting direction (sort in descending order), add a hyphen before the parameter. For example, sort=-id.

Parameters Description

Parameters Type Description
items Optional[List[SortItem]]

Fields by which to sort. Possible values:

  • id - File ID in ascending order.
  • created - Date of sending the file in UTC in the yyyy-MM-DD format (ascending).


How to specify and use SortItems.

sort = toloka.client.search_requests.AttachmentSortItems(['-created', 'id'])
result = toloka_client.find_attachments(pool_id=my_pretty_pool_id, sort=sort, limit=10)