download_attachment

toloka.client.TolokaClient.download_attachment | Source code

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

Downloads an attachment.

Parameters description

ParametersTypeDescription
attachment_idstr

The ID of the attachment.

outBinaryIO

A file object used to save the downloaded file.

Examples:

How to download an attachment.

with open('my_new_file.txt', 'wb') as out_f:
toloka_client.download_attachment(attachment_id='0983459b-e26f-42f3-a5fd-6e3feee913e7', out=out_f)

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming