ó
    õ]ËgÚr  ã                   óN  • S SK rS SKJr  S SKJr  S SKJr  S SKJ	r	J
r
JrJr   S SKJr   S S	KJr  S rS rS rS rS rS r\" \" \S5      5       S"S j5       r\" \" \S5      5       S"S j5       r S"S jr S"S jr S"S jr S"S jr\" \" \S5      5          S#S j5       r     S#S jr    S#S jr \" \" \S5      5       S"S j5       r! S"S jr" S"S jr#\" \" \S5      5       S"S j5       r$ S"S jr% S"S  jr&g! \ a    S SKJr  S!S jr Nêf = f! \ a    S
 r Nòf = f)$é    N)Úpartial)ÚClientError)Úutils)ÚProgressCallbackInvokerÚ
S3TransferÚTransferConfigÚcreate_transfer_manager)Úwith_current_context©Úwrapsc                 ó   • S nU$ )Nc                 ó0   ^ • [        T 5      U 4S j5       nU$ )Nc                  ó   >• T" U 0 UD6$ ©N© )ÚargsÚkwargsÚfuncs     €Ú1/usr/lib/python3/dist-packages/boto3/s3/inject.pyÚwrapperÚ8with_current_context.<locals>.decorator.<locals>.wrapper!   s   ø€ á˜TÐ, VÑ,Ð,ó    r   )r   r   s   ` r   Ú	decoratorÚ'with_current_context.<locals>.decorator    s    ø€ Ü�4‹[ô-ó ð-ð ˆNr   r   )Úhookr   s     r   r
   r
      s   € ò	ð Ðr   )Úregister_feature_idc                 ó   • g r   r   )Ú
feature_ids    r   r   r   .   s   € Ør   c                 ó  • [         R                  " U S[        5        [         R                  " U S[        5        [         R                  " U S[        5        [         R                  " U S[
        5        [         R                  " U S[        5        g ©NÚupload_fileÚdownload_fileÚcopyÚupload_fileobjÚdownload_fileobj)r   Úinject_attributer!   r"   r#   r$   r%   ©Úclass_attributesr   s     r   Úinject_s3_transfer_methodsr)   2   sf   € Ü	×ÒÐ+¨]¼KÔHÜ	×ÒÐ+¨_¼mÔLÜ	×ÒÐ+¨V´TÔ:Ü	×ÒÐ+Ð-=¼~ÔNÜ	×ÒØÐ,Ô.>õr   c                 óT  • [         R                  " U S[        5        [         R                  " U S[        5        [         R                  " U S[        5        [         R                  " U S[
        5        [         R                  " U S[        5        [         R                  " U S[        5        g )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_methodsr2   <   s„   € Ü	×ÒÐ+¨V´[ÔAÜ	×ÒÐ+¨]Ô<NÔOÜ	×ÒØ˜/Ô+?ôô 
×ÒÐ+¨V´[ÔAÜ	×ÒØÐ*Ô,Aôô 
×ÒØÐ,Ô.Eõr   c                 ó  • [         R                  " U S[        5        [         R                  " U S[        5        [         R                  " U S[        5        [         R                  " U S[
        5        [         R                  " U S[        5        g r    )r   r&   Úobject_upload_fileÚobject_download_fileÚobject_copyÚobject_upload_fileobjÚobject_download_fileobjr'   s     r   Úinject_object_methodsr9   K   sq   € Ü	×ÒÐ+¨]Ô<NÔOÜ	×ÒØ˜/Ô+?ôô 
×ÒÐ+¨V´[ÔAÜ	×ÒØÐ*Ô,Aôô 
×ÒØÐ,Ô.Eõr   c                 ó<   • [         R                  " U S[        5        g )Nr+   )r   r&   Úobject_summary_loadr'   s     r   Úinject_object_summary_methodsr<   Y   s   € Ü	×ÒÐ+¨VÔ5HÕIr   c                 ó`  • 0 U R                   l         U R                   R                  R                  5       nUS    H(  nUS   U R                  :X  d  M  X@R                   l          g   g! [
         a:  nUR                  R                  S0 5      R                  S5      S:X  d  e  SnAgSnAff = f)zQ
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)Úselfr   r   rH   Úbucket_dataÚes         r   r,   r,   ]   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-Á30B(Â(B-c                 óÈ   • U R                   R                  R                  U R                  U R                  S9nSU;   a  UR                  S5      US'   X0R                   l        g)zU
Calls s3.Client.head_object to update the attributes of the ObjectSummary
resource.
)ÚBucketÚKeyÚContentLengthÚSizeN)rC   rE   Úhead_objectÚbucket_nameÚkeyÚpoprD   )rJ   r   r   rH   s       r   r;   r;   v   sX   € ð
 �y‰y×Ñ×+Ñ+Ø×Ñ T§X¡Xð ,ð €Hð ˜(Ó"Ø#Ÿ<™<¨Ó8ˆ�ÑØ‡I�I…Nr   ÚS3_TRANSFERc           	      ót   • [        X5       nUR                  UUUUUS9sSSS5        $ ! , (       d  f       g= f)a  Upload a file to an S3 object.

Usage::

    import boto3
    s3 = boto3.client('s3')
    s3.upload_file('/tmp/hello.txt', 'amzn-s3-demo-bucket', '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
    :py:attr:`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ÚbucketrT   Ú
extra_argsÚcallbackN)r   r!   )rJ   ÚFilenamerN   rO   Ú	ExtraArgsÚCallbackÚConfigÚtransfers           r   r!   r!   ƒ   s=   € ôL 
�DÔ	! XØ×#Ñ#ØØØØ Øð $ð 
÷ 
"×	!×	!úó   Œ)©
7c           	      ót   • [        X5       nUR                  UUUUUS9sSSS5        $ ! , (       d  f       g= f)a  Download an S3 object to a file.

Usage::

    import boto3
    s3 = boto3.client('s3')
    s3.download_file('amzn-s3-demo-bucket', '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
    :py:attr:`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.
)rY   rT   rX   rZ   r[   N)r   r"   )rJ   rN   rO   r\   r]   r^   r_   r`   s           r   r"   r"   ³   s=   € ôL 
�DÔ	! XØ×%Ñ%ØØØØ Øð &ð 
÷ 
"×	!×	!úra   c           	      óf   • U R                   R                  R                  UU R                  UUUUS9$ )aÁ  Upload a file to an S3 object.

Usage::

    import boto3
    s3 = boto3.resource('s3')
    s3.Bucket('amzn-s3-demo-bucket').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
    :py:attr:`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.
©r\   rN   rO   r]   r^   r_   )rC   rE   r!   rG   )rJ   r\   rO   r]   r^   r_   s         r   r-   r-   ã   s=   € ðD �9‰9×Ñ×'Ñ'ØØ�y‰yØØØØð (ð ð r   c           	      óf   • U R                   R                  R                  U R                  UUUUUS9$ )aÖ  Download an S3 object to a file.

Usage::

    import boto3
    s3 = boto3.resource('s3')
    s3.Bucket('amzn-s3-demo-bucket').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
    :py:attr:`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.
©rN   rO   r\   r]   r^   r_   )rC   rE   r"   rG   )rJ   rO   r\   r]   r^   r_   s         r   r.   r.     s=   € ðD �9‰9×Ñ×)Ñ)Ø�y‰yØØØØØð *ð ð r   c           	      óz   • U R                   R                  R                  UU R                  U R                  UUUS9$ )aƒ  Upload a file to an S3 object.

Usage::

    import boto3
    s3 = boto3.resource('s3')
    s3.Object('amzn-s3-demo-bucket', '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
    :py:attr:`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.
rd   )rC   rE   r!   rS   rT   ©rJ   r\   r]   r^   r_   s        r   r4   r4   ;  sB   € ð> �9‰9×Ñ×'Ñ'ØØ×ÑØ�H‰HØØØð (ð ð r   c           	      óz   • U R                   R                  R                  U R                  U R                  UUUUS9$ )a”  Download an S3 object to a file.

Usage::

    import boto3
    s3 = boto3.resource('s3')
    s3.Object('amzn-s3-demo-bucket', '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
    :py:attr:`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   )rC   rE   r"   rS   rT   rh   s        r   r5   r5   d  sB   € ð> �9‰9×Ñ×)Ñ)Ø×ÑØ�H‰HØØØØð *ð ð r   c           
      ó  • SnUb  [        U5      /nUn	U	c
  [        5       n	[        R                  " U	5      n
SU
l        [        X
5       nUR                  UUUUUUS9nUR                  5       sSSS5        $ ! , (       d  f       g= f)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': 'amzn-s3-demo-bucket1',
        'Key': 'mykey'
    }
    s3.meta.client.copy(copy_source, 'amzn-s3-demo-bucket2', '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
    :py:attr:`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_sourcerY   rT   rZ   ÚsubscribersÚsource_client)r   r   Úpython_copyr#   Úpreferred_transfer_clientr	   Úresult)rJ   Ú
CopySourcerN   rO   r]   r^   ÚSourceClientr_   rm   ÚconfigÚ
new_configÚmanagerÚfutures                r   r#   r#   �  s�   € ðv €KØÑÜ.¨xÓ8Ð9ˆà€FØ�~ÜÓ!ˆô ×!Ò! &Ó)€JØ+4€JÔ(ä	  Ô	2°gØ—‘Ø"ØØØ Ø#Ø&ð ð 
ˆð �}‰}‹÷ 
3×	2×	2ús   Á	$A7Á7
Bc           
      óh   • U R                   R                  R                  UU R                  UUUUUS9$ )a7  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': 'amzn-s3-demo-bucket1',
        'Key': 'mykey'
    }
    bucket = s3.Bucket('amzn-s3-demo-bucket2')
    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
    :py:attr:`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.
©rr   rN   rO   r]   r^   rs   r_   )rC   rE   r#   rG   )rJ   rr   rO   r]   r^   rs   r_   s          r   r/   r/   à  s@   € ðn �9‰9×Ñ× Ñ ØØ�y‰yØØØØ!Øð !ð ð r   c           
      ó|   • U R                   R                  R                  UU R                  U R                  UUUUS9$ )a  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': 'amzn-s3-demo-bucket1',
        'Key': 'mykey'
    }
    bucket = s3.Bucket('amzn-s3-demo-bucket2')
    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
    :py:attr:`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.
ry   )rC   rE   r#   rS   rT   )rJ   rr   r]   r^   rs   r_   s         r   r6   r6   "  sF   € ðh �9‰9×Ñ× Ñ ØØ×ÑØ�H‰HØØØ!Øð !ð ð r   c           	      ó  • [        US5      (       d  [        S5      eSnUb  [        U5      /nUnUc
  [        5       n[	        X5       n	U	R                  UUUUUS9n
U
R                  5       sSSS5        $ ! , (       d  f       g= f)aW  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, 'amzn-s3-demo-bucket', '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
    :py:attr:`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)ÚfileobjrY   rT   rZ   rm   )ÚhasattrÚ
ValueErrorr   r   r	   Úuploadrq   )rJ   ÚFileobjrN   rO   r]   r^   r_   rm   rt   rv   rw   s              r   r$   r$   a  s‹   € ôT �7˜F×#Ñ#ÜÐ6Ó7Ð7à€KØÑÜ.¨xÓ8Ð9ˆà€FØ�~ÜÓ!ˆä	  Ô	.°'Ø—‘ØØØØ Ø#ð  ð 
ˆð �}‰}‹÷ 
/×	.×	.úó   Á#A5Á5
Bc           	      óf   • U R                   R                  R                  UU R                  UUUUS9$ )a6  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('amzn-s3-demo-bucket')

    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
    :py:attr:`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.
©r�   rN   rO   r]   r^   r_   )rC   rE   r$   rG   )rJ   r�   rO   r]   r^   r_   s         r   r0   r0   ¡  s=   € ðN �9‰9×Ñ×*Ñ*ØØ�y‰yØØØØð +ð ð r   c           	      óz   • U R                   R                  R                  UU R                  U R                  UUUS9$ )a  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('amzn-s3-demo-bucket')
    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
    :py:attr:`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.
r„   )rC   rE   r$   rS   rT   ©rJ   r�   r]   r^   r_   s        r   r7   r7   Ò  sC   € ðJ �9‰9×Ñ×*Ñ*ØØ×ÑØ�H‰HØØØð +ð ð r   c           	      ó  • [        US5      (       d  [        S5      eSnUb  [        U5      /nUnUc
  [        5       n[	        X5       n	U	R                  UUUUUS9n
U
R                  5       sSSS5        $ ! , (       d  f       g= f)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('amzn-s3-demo-bucket', '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
    :py:attr:`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)rY   rT   r}   rZ   rm   )r~   r   r   r   r	   Údownloadrq   )rJ   rN   rO   r�   r]   r^   r_   rm   rt   rv   rw   s              r   r%   r%     s�   € ôT �7˜G×$Ñ$ÜÐ7Ó8Ð8à€KØÑÜ.¨xÓ8Ð9ˆà€FØ�~ÜÓ!ˆä	  Ô	.°'Ø×!Ñ!ØØØØ Ø#ð "ð 
ˆð �}‰}‹÷ 
/×	.×	.úr‚   c           	      óf   • U R                   R                  R                  U R                  UUUUUS9$ )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('amzn-s3-demo-bucket')

    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
    :py:attr:`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.
©rN   rO   r�   r]   r^   r_   )rC   rE   r%   rG   )rJ   rO   r�   r]   r^   r_   s         r   r1   r1   A  s=   € ðN �9‰9×Ñ×,Ñ,Ø�y‰yØØØØØð -ð ð r   c           	      óz   • U R                   R                  R                  U R                  U R                  UUUUS9$ )a*  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('amzn-s3-demo-bucket')
    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
    :py:attr:`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‹   )rC   rE   r%   rS   rT   r†   s        r   r8   r8   r  sC   € ðJ �9‰9×Ñ×,Ñ,Ø×ÑØ�H‰HØØØØð -ð ð r   r   )NNN)NNNN)'r#   ro   Ú	functoolsr   Úbotocore.exceptionsr   Úboto3r   Úboto3.s3.transferr   r   r   r	   Úbotocore.contextr
   ÚImportErrorr   Úbotocore.useragentr   r)   r2   r9   r<   r,   r;   r!   r"   r-   r.   r4   r5   r/   r6   r$   r0   r7   r%   r1   r8   r   r   r   Ú<module>r”      sË  ðó Ý å +å ÷ó ðÝ5ðÝ6òòòòJòò2
ñ ‘gÐ1°=ÓAÓBàGKó,
ó Cð,
ñ^ ‘gÐ1°=ÓAÓBàGKó,
ó Cð,
ð` @Dô)ðZ @Dô)ðZ ;?ô&ðT ;?ô&ñR ‘gÐ1°=ÓAÓBð ØØØóOó CðOðl ØØØô?ðJ ØØØô<ñ~ ‘gÐ1°=ÓAÓBàFJó<ó Cð<ð@ ?Cô.ðd :>ô,ñ^ ‘gÐ1°=ÓAÓBàFJó<ó Cð<ð@ ?Cô.ðd :>õ,øðm ó Ýöðûð  ó ôðús"   ¤D «D ÄDÄDÄ	D$Ä#D$