Ë
    æ÷Ôe-n  ã                   ó  — d dl Zd dlmZ d dlmZ d dlmZmZm	Z	m
Z
 d„ Zd„ Zd„ Zd„ Zd	„ Zd
„ Z	 dd„Z	 dd„Z	 dd„Z	 dd„Z	 dd„Z	 dd„Z	 	 	 	 dd„Z 	 	 	 	 dd„Z	 	 	 	 dd„Z	 dd„Z	 dd„Z	 dd„Z	 dd„Z	 dd„Z	 dd„Zy)é    N)ÚClientError)Úutils)ÚProgressCallbackInvokerÚ
S3TransferÚTransferConfigÚcreate_transfer_managerc                 ó  — t        j                  | dt        «       t        j                  | dt        «       t        j                  | dt        «       t        j                  | dt
        «       t        j                  | dt        «       y ©NÚupload_fileÚdownload_fileÚcopyÚupload_fileobjÚdownload_fileobj)r   Úinject_attributer   r   r   r   r   ©Úclass_attributesÚkwargss     ú1/usr/lib/python3/dist-packages/boto3/s3/inject.pyÚinject_s3_transfer_methodsr      sf   € Ü	×ÑÐ+¨]¼KÔHÜ	×ÑÐ+¨_¼mÔLÜ	×ÑÐ+¨V´TÔ:Ü	×ÑÐ+Ð-=¼~ÔNÜ	×ÑØÐ,Ô.>õó    c                 óH  — t        j                  | dt        «       t        j                  | dt        «       t        j                  | dt        «       t        j                  | dt
        «       t        j                  | dt        «       t        j                  | dt        «       y )NÚloadr   r   r   r   r   )r   r   Úbucket_loadÚbucket_upload_fileÚbucket_download_fileÚbucket_copyÚbucket_upload_fileobjÚbucket_download_fileobjr   s     r   Úinject_bucket_methodsr   $   s„   € Ü	×ÑÐ+¨V´[ÔAÜ	×ÑÐ+¨]Ô<NÔOÜ	×ÑØ˜/Ô+?ôô 
×ÑÐ+¨V´[ÔAÜ	×ÑØÐ*Ô,Aôô 
×ÑØÐ,Ô.Eõr   c                 ó  — t        j                  | dt        «       t        j                  | dt        «       t        j                  | dt        «       t        j                  | dt
        «       t        j                  | dt        «       y r
   )r   r   Úobject_upload_fileÚobject_download_fileÚobject_copyÚobject_upload_fileobjÚobject_download_fileobjr   s     r   Úinject_object_methodsr&   3   sq   € Ü	×ÑÐ+¨]Ô<NÔOÜ	×ÑØ˜/Ô+?ôô 
×ÑÐ+¨V´[ÔAÜ	×ÑØÐ*Ô,Aôô 
×ÑØÐ,Ô.Eõr   c                 ó:   — t        j                  | dt        «       y )Nr   )r   r   Úobject_summary_loadr   s     r   Úinject_object_summary_methodsr)   A   s   € Ü	×ÑÐ+¨VÔ5HÕIr   c                 óX  — i | j                   _        	 | j                   j                  j                  «       }|d   D ]'  }|d   | j                  k(  sŒ|| j                   _         y y# t
        $ r9}|j                  j                  di «      j                  d«      dk(  s‚ Y d}~yd}~ww xY w)z]
    Calls s3.Client.list_buckets() to update the attributes of the Bucket
    resource.
    ÚBucketsÚNameÚErrorÚCodeÚAccessDeniedN)ÚmetaÚdataÚclientÚlist_bucketsÚnamer   ÚresponseÚget)ÚselfÚargsr   r5   Úbucket_dataÚes         r   r   r   E   sœ   € ð €D‡I�I„NðØ—9‘9×#Ñ#×0Ñ0Ó2ˆØ# IÑ.ò 	ˆKØ˜6Ñ" d§i¡iÓ/Ø!,�—	‘	”Ùñ	øô ò Ø�z‰z�~‰~˜g rÓ*×.Ñ.¨vÓ6¸.ÒHØô Iûðús#   “>A' ÁA' Á%A' Á'	B)Á0/B$Â$B)c                 óÌ   — | j                   j                  j                  | j                  | j                  ¬«      }d|v r|j                  d«      |d<   || j                   _        y)za
    Calls s3.Client.head_object to update the attributes of the ObjectSummary
    resource.
    )ÚBucketÚKeyÚContentLengthÚSizeN)r0   r2   Úhead_objectÚbucket_nameÚkeyÚpopr1   )r7   r8   r   r5   s       r   r(   r(   ^   sZ   € ð
 �y‰y×Ñ×+Ñ+Ø×Ñ T§X¡Xð ,ó €Hð ˜(Ñ"Ø#Ÿ<™<¨Ó8ˆ�ÑØ€D‡I�I…Nr   c                 ór   — t        | |«      5 }|j                  |||||¬«      cddd«       S # 1 sw Y   yxY w)aM  Upload a file to an S3 object.

    Usage::

        import boto3
        s3 = boto3.client('s3')
        s3.upload_file('/tmp/hello.txt', 'mybucket', 'hello.txt')

    Similar behavior as S3Transfer's upload_file() method, except that
    argument names are capitalized. Detailed examples can be found at
    :ref:`S3Transfer's Usage <ref_s3transfer_usage>`.

    :type Filename: str
    :param Filename: The path to the file to upload.

    :type Bucket: str
    :param Bucket: The name of the bucket to upload to.

    :type Key: str
    :param Key: The name of the key to upload to.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed upload arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the upload.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        transfer.
    )ÚfilenameÚbucketrB   Ú
extra_argsÚcallbackN)r   r   )r7   ÚFilenamer<   r=   Ú	ExtraArgsÚCallbackÚConfigÚtransfers           r   r   r   k   sH   € ôJ 
�D˜&Ó	!ð 
 XØ×#Ñ#ØØØØ Øð $ó 
÷
÷ 
ò 
úó   �-­6c                 ór   — t        | |«      5 }|j                  |||||¬«      cddd«       S # 1 sw Y   yxY w)ap  Download an S3 object to a file.

    Usage::

        import boto3
        s3 = boto3.resource('s3')
        s3.meta.client.download_file('mybucket', 'hello.txt', '/tmp/hello.txt')

    Similar behavior as S3Transfer's download_file() method,
    except that parameters are capitalized. Detailed examples can be found at
    :ref:`S3Transfer's Usage <ref_s3transfer_usage>`.

    :type Bucket: str
    :param Bucket: The name of the bucket to download from.

    :type Key: str
    :param Key: The name of the key to download from.

    :type Filename: str
    :param Filename: The path to the file to download to.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed download arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the download.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        transfer.
    )rF   rB   rE   rG   rH   N)r   r   )r7   r<   r=   rI   rJ   rK   rL   rM   s           r   r   r   š   sH   € ôJ 
�D˜&Ó	!ð 
 XØ×%Ñ%ØØØØ Øð &ó 
÷
÷ 
ò 
úrN   c                 ól   — | j                   j                  j                  || j                  ||||¬«      S )a  Upload a file to an S3 object.

    Usage::

        import boto3
        s3 = boto3.resource('s3')
        s3.Bucket('mybucket').upload_file('/tmp/hello.txt', 'hello.txt')

    Similar behavior as S3Transfer's upload_file() method,
    except that parameters are capitalized. Detailed examples can be found at
    :ref:`S3Transfer's Usage <ref_s3transfer_usage>`.

    :type Filename: str
    :param Filename: The path to the file to upload.

    :type Key: str
    :param Key: The name of the key to upload to.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed upload arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the upload.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        transfer.
    ©rI   r<   r=   rJ   rK   rL   )r0   r2   r   r4   )r7   rI   r=   rJ   rK   rL   s         r   r   r   É   s=   € ðD �9‰9×Ñ×'Ñ'ØØ�y‰yØØØØð (ó ð r   c                 ól   — | j                   j                  j                  | j                  |||||¬«      S )a  Download an S3 object to a file.

    Usage::

        import boto3
        s3 = boto3.resource('s3')
        s3.Bucket('mybucket').download_file('hello.txt', '/tmp/hello.txt')

    Similar behavior as S3Transfer's download_file() method,
    except that parameters are capitalized. Detailed examples can be found at
    :ref:`S3Transfer's Usage <ref_s3transfer_usage>`.

    :type Key: str
    :param Key: The name of the key to download from.

    :type Filename: str
    :param Filename: The path to the file to download to.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed download arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the download.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        transfer.
    ©r<   r=   rI   rJ   rK   rL   )r0   r2   r   r4   )r7   r=   rI   rJ   rK   rL   s         r   r   r   õ   s=   € ðD �9‰9×Ñ×)Ñ)Ø�y‰yØØØØØð *ó ð r   c                 ó€   — | j                   j                  j                  || j                  | j                  |||¬«      S )a½  Upload a file to an S3 object.

    Usage::

        import boto3
        s3 = boto3.resource('s3')
        s3.Object('mybucket', 'hello.txt').upload_file('/tmp/hello.txt')

    Similar behavior as S3Transfer's upload_file() method,
    except that parameters are capitalized. Detailed examples can be found at
    :ref:`S3Transfer's Usage <ref_s3transfer_usage>`.

    :type Filename: str
    :param Filename: The path to the file to upload.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed upload arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the upload.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        transfer.
    rQ   )r0   r2   r   rA   rB   ©r7   rI   rJ   rK   rL   s        r   r!   r!   !  sB   € ð> �9‰9×Ñ×'Ñ'ØØ×ÑØ�H‰HØØØð (ó ð r   c                 ó€   — | j                   j                  j                  | j                  | j                  ||||¬«      S )aÎ  Download an S3 object to a file.

    Usage::

        import boto3
        s3 = boto3.resource('s3')
        s3.Object('mybucket', 'hello.txt').download_file('/tmp/hello.txt')

    Similar behavior as S3Transfer's download_file() method,
    except that parameters are capitalized. Detailed examples can be found at
    :ref:`S3Transfer's Usage <ref_s3transfer_usage>`.

    :type Filename: str
    :param Filename: The path to the file to download to.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed download arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the download.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        transfer.
    rS   )r0   r2   r   rA   rB   rU   s        r   r"   r"   J  sB   € ð> �9‰9×Ñ×)Ñ)Ø×ÑØ�H‰HØØØØð *ó ð r   c           	      ó  — d}|�t        |«      g}|}	|	€
t        «       }	t        j                  |	«      }
d|
_        t        | |
«      5 }|j                  ||||||¬«      }|j                  «       cddd«       S # 1 sw Y   yxY w)aÏ  Copy an object from one S3 location to another.

    This is a managed transfer which will perform a multipart copy in
    multiple threads if necessary.

    Usage::

        import boto3
        s3 = boto3.resource('s3')
        copy_source = {
            'Bucket': 'mybucket',
            'Key': 'mykey'
        }
        s3.meta.client.copy(copy_source, 'otherbucket', 'otherkey')

    :type CopySource: dict
    :param CopySource: The name of the source bucket, key name of the
        source object, and optional version ID of the source object. The
        dictionary format is:
        ``{'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}``. Note
        that the ``VersionId`` key is optional and may be omitted.

    :type Bucket: str
    :param Bucket: The name of the bucket to copy to

    :type Key: str
    :param Key: The name of the key to copy to

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed download arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the copy.

    :type SourceClient: botocore or boto3 Client
    :param SourceClient: The client to be used for operation that
        may happen at the source object. For example, this client is
        used for the head_object that determines the size of the copy.
        If no client is provided, the current client is used as the client
        for the source object.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        copy.
    NÚclassic)Úcopy_sourcerF   rB   rG   ÚsubscribersÚsource_client)r   r   Úpython_copyr   Úpreferred_transfer_clientr   Úresult)r7   Ú
CopySourcer<   r=   rJ   rK   ÚSourceClientrL   rZ   ÚconfigÚ
new_configÚmanagerÚfutures                r   r   r   s  sš   € ðt €KØÐÜ.¨xÓ8Ð9ˆà€FØ€~ÜÓ!ˆô ×!Ñ! &Ó)€JØ+4€JÔ(ä	   zÓ	2ð 	°gØ—‘Ø"ØØØ Ø#Ø&ð ó 
ˆð �}‰}‹÷	÷ 	ò 	ús   Á'A8Á8Bc           	      ón   — | j                   j                  j                  || j                  |||||¬«      S )a§  Copy an object from one S3 location to an object in this bucket.

    This is a managed transfer which will perform a multipart copy in
    multiple threads if necessary.

    Usage::

        import boto3
        s3 = boto3.resource('s3')
        copy_source = {
            'Bucket': 'mybucket',
            'Key': 'mykey'
        }
        bucket = s3.Bucket('otherbucket')
        bucket.copy(copy_source, 'otherkey')

    :type CopySource: dict
    :param CopySource: The name of the source bucket, key name of the
        source object, and optional version ID of the source object. The
        dictionary format is:
        ``{'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}``. Note
        that the ``VersionId`` key is optional and may be omitted.

    :type Key: str
    :param Key: The name of the key to copy to

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed download arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the copy.

    :type SourceClient: botocore or boto3 Client
    :param SourceClient: The client to be used for operation that
        may happen at the source object. For example, this client is
        used for the head_object that determines the size of the copy.
        If no client is provided, the current client is used as the client
        for the source object.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        copy.
    ©r_   r<   r=   rJ   rK   r`   rL   )r0   r2   r   r4   )r7   r_   r=   rJ   rK   r`   rL   s          r   r   r   Å  s@   € ðn �9‰9×Ñ× Ñ ØØ�y‰yØØØØ!Øð !ó ð r   c           	      ó‚   — | j                   j                  j                  || j                  | j                  ||||¬«      S )ap  Copy an object from one S3 location to this object.

    This is a managed transfer which will perform a multipart copy in
    multiple threads if necessary.

    Usage::

        import boto3
        s3 = boto3.resource('s3')
        copy_source = {
            'Bucket': 'mybucket',
            'Key': 'mykey'
        }
        bucket = s3.Bucket('otherbucket')
        obj = bucket.Object('otherkey')
        obj.copy(copy_source)

    :type CopySource: dict
    :param CopySource: The name of the source bucket, key name of the
        source object, and optional version ID of the source object. The
        dictionary format is:
        ``{'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}``. Note
        that the ``VersionId`` key is optional and may be omitted.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed download arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the copy.

    :type SourceClient: botocore or boto3 Client
    :param SourceClient: The client to be used for operation that
        may happen at the source object. For example, this client is
        used for the head_object that determines the size of the copy.
        If no client is provided, the current client is used as the client
        for the source object.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        copy.
    rf   )r0   r2   r   rA   rB   )r7   r_   rJ   rK   r`   rL   s         r   r#   r#     sF   € ðh �9‰9×Ñ× Ñ ØØ×ÑØ�H‰HØØØ!Øð !ó ð r   c                 óü   — t        |d«      st        d«      ‚d}|�t        |«      g}|}|€
t        «       }t	        | |«      5 }	|	j                  |||||¬«      }
|
j                  «       cddd«       S # 1 sw Y   yxY w)a©  Upload a file-like object to S3.

    The file-like object must be in binary mode.

    This is a managed transfer which will perform a multipart upload in
    multiple threads if necessary.

    Usage::

        import boto3
        s3 = boto3.client('s3')

        with open('filename', 'rb') as data:
            s3.upload_fileobj(data, 'mybucket', 'mykey')

    :type Fileobj: a file-like object
    :param Fileobj: A file-like object to upload. At a minimum, it must
        implement the `read` method, and must return bytes.

    :type Bucket: str
    :param Bucket: The name of the bucket to upload to.

    :type Key: str
    :param Key: The name of the key to upload to.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed upload arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the upload.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        upload.
    ÚreadzFileobj must implement readN)ÚfileobjrF   rB   rG   rZ   )ÚhasattrÚ
ValueErrorr   r   r   Úuploadr^   )r7   ÚFileobjr<   r=   rJ   rK   rL   rZ   ra   rc   rd   s              r   r   r   F  s“   € ôR �7˜FÔ#ÜÐ6Ó7Ð7à€KØÐÜ.¨xÓ8Ð9ˆà€FØ€~ÜÓ!ˆä	   vÓ	.ð °'Ø—‘ØØØØ Ø#ð  ó 
ˆð �}‰}‹÷÷ ò úó   Á&A2Á2A;c                 ól   — | j                   j                  j                  || j                  ||||¬«      S )a„  Upload a file-like object to this bucket.

    The file-like object must be in binary mode.

    This is a managed transfer which will perform a multipart upload in
    multiple threads if necessary.

    Usage::

        import boto3
        s3 = boto3.resource('s3')
        bucket = s3.Bucket('mybucket')

        with open('filename', 'rb') as data:
            bucket.upload_fileobj(data, 'mykey')

    :type Fileobj: a file-like object
    :param Fileobj: A file-like object to upload. At a minimum, it must
        implement the `read` method, and must return bytes.

    :type Key: str
    :param Key: The name of the key to upload to.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed upload arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the upload.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        upload.
    ©rn   r<   r=   rJ   rK   rL   )r0   r2   r   r4   )r7   rn   r=   rJ   rK   rL   s         r   r   r   …  s=   € ðN �9‰9×Ñ×*Ñ*ØØ�y‰yØØØØð +ó ð r   c                 ó€   — | j                   j                  j                  || j                  | j                  |||¬«      S )aW  Upload a file-like object to this object.

    The file-like object must be in binary mode.

    This is a managed transfer which will perform a multipart upload in
    multiple threads if necessary.

    Usage::

        import boto3
        s3 = boto3.resource('s3')
        bucket = s3.Bucket('mybucket')
        obj = bucket.Object('mykey')

        with open('filename', 'rb') as data:
            obj.upload_fileobj(data)

    :type Fileobj: a file-like object
    :param Fileobj: A file-like object to upload. At a minimum, it must
        implement the `read` method, and must return bytes.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed upload arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the upload.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        upload.
    rq   )r0   r2   r   rA   rB   ©r7   rn   rJ   rK   rL   s        r   r$   r$   ¶  sC   € ðJ �9‰9×Ñ×*Ñ*ØØ×ÑØ�H‰HØØØð +ó ð r   c                 óü   — t        |d«      st        d«      ‚d}|�t        |«      g}|}|€
t        «       }t	        | |«      5 }	|	j                  |||||¬«      }
|
j                  «       cddd«       S # 1 sw Y   yxY w)aÕ  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)

    :type Bucket: str
    :param Bucket: The name of the bucket to download from.

    :type Key: str
    :param Key: The name of the key to download from.

    :type Fileobj: a file-like object
    :param Fileobj: A file-like object to download into. At a minimum, it must
        implement the `write` method and must accept bytes.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed download arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the download.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        download.
    ÚwritezFileobj must implement writeN)rF   rB   rj   rG   rZ   )rk   rl   r   r   r   Údownloadr^   )r7   r<   r=   rn   rJ   rK   rL   rZ   ra   rc   rd   s              r   r   r   å  s•   € ôR �7˜GÔ$ÜÐ7Ó8Ð8à€KØÐÜ.¨xÓ8Ð9ˆà€FØ€~ÜÓ!ˆä	   vÓ	.ð °'Ø×!Ñ!ØØØØ Ø#ð "ó 
ˆð �}‰}‹÷÷ ò úro   c                 ól   — | j                   j                  j                  | j                  |||||¬«      S )a¬  Download an object from this bucket 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.resource('s3')
        bucket = s3.Bucket('mybucket')

        with open('filename', 'wb') as data:
            bucket.download_fileobj('mykey', data)

    :type Fileobj: a file-like object
    :param Fileobj: A file-like object to download into. At a minimum, it must
        implement the `write` method and must accept bytes.

    :type Key: str
    :param Key: The name of the key to download from.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed download arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the download.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        download.
    ©r<   r=   rn   rJ   rK   rL   )r0   r2   r   r4   )r7   r=   rn   rJ   rK   rL   s         r   r   r   $  s=   € ðN �9‰9×Ñ×,Ñ,Ø�y‰yØØØØØð -ó ð r   c                 ó€   — | j                   j                  j                  | j                  | j                  ||||¬«      S )at  Download this 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.resource('s3')
        bucket = s3.Bucket('mybucket')
        obj = bucket.Object('mykey')

        with open('filename', 'wb') as data:
            obj.download_fileobj(data)

    :type Fileobj: a file-like object
    :param Fileobj: A file-like object to download into. At a minimum, it must
        implement the `write` method and must accept bytes.

    :type ExtraArgs: dict
    :param ExtraArgs: Extra arguments that may be passed to the
        client operation. For allowed download arguments see
        boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS.

    :type Callback: function
    :param Callback: A method which takes a number of bytes transferred to
        be periodically called during the download.

    :type Config: boto3.s3.transfer.TransferConfig
    :param Config: The transfer configuration to be used when performing the
        download.
    rx   )r0   r2   r   rA   rB   rs   s        r   r%   r%   U  sC   € ðJ �9‰9×Ñ×,Ñ,Ø×ÑØ�H‰HØØØØð -ó ð r   )NNN)NNNN)r   r\   Úbotocore.exceptionsr   Úboto3r   Úboto3.s3.transferr   r   r   r   r   r   r&   r)   r   r(   r   r   r   r   r!   r"   r   r#   r   r   r$   r   r   r%   © r   r   ú<module>r~      s  ðó å +å ÷ó òòòòJòò2
ð HLó,
ð` HLó,
ð` @Dó)ðZ @Dó)ðZ ;?ó&ðT ;?ó&ð\ ØØØóOðl ØØØó?ðJ ØØØó<ð@ GKó<ð@ ?Có.ðd :>ó,ð` GKó<ð@ ?Có.ðd :>ô,r   