S3.Client.
download_fileobj
(Bucket, Key, Fileobj, ExtraArgs=None, Callback=None, Config=None)¶Download an object from S3 to a file-like object.
The file-like object must be in binary mode.
This is a managed transfer which will perform a multipart download in multiple threads if necessary.
Usage:
import boto3
s3 = boto3.client('s3')
with open('filename', 'wb') as data:
s3.download_fileobj('mybucket', 'mykey', data)