Toloka documentation



AttachmentSortItems(self, items=None)

Keys for sorting attachments in search results.

Parameters Description

Parameters Type Description
items Optional[List[SortItem]]

A list of sorting keys. Supported values:

  • 'id' — The ID of an attachment.
  • 'created' — The date of uploading an attachment.


The example shows how to find attachments sorted by uploading date in descending order. Attachments with equal uploading dates are sorted by IDs in ascending order.

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