download_attachment

toloka.client.TolokaClient.download_attachment | Source code

download_attachment(
self,
attachment_id: str,
out: BinaryIO
)

Downloads specific attachment

Parameters Description

ParametersTypeDescription
attachment_idstr

ID of attachment.

outBinaryIO

File object where to put downloaded file.

Examples:

How to download an attachment.

with open('my_new_file.txt', 'wb') as out_f:
toloka_client.download_attachment(attachment_id='1', out=out_f)
Toloka-Kit
OverviewGetting OAuth tokenQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming