403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/s3transfer/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/s3transfer/__pycache__/__init__.cpython-314.pyc
+
�Ci$s����Rt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	^RI
t
^RIt^RIHt^RI
HtHt^RIHt^RIt^RIHtHtRtRt]P2!]4t]P9]!44Rt]!4tRRlt R	t!R
t"!RR]#4t$!R
R4t%!RR4t&!RR4t'!RR4t(!RR]PR4t*!RR4t+!RR4t,!RR4t-R#)a�Abstractions over S3's upload/download operations.

This module provides high level abstractions for efficient
uploads/downloads.  It handles several things for the user:

* Automatically switching to multipart transfers when
  a file is over a specific size threshold
* Uploading/downloading a file in parallel
* Throttling based on max bandwidth
* Progress callbacks to monitor transfers
* Retries.  While botocore handles retries for streaming uploads,
  it is not possible for it to handle retries for streaming
  downloads.  This module handles retries for both cases so
  you don't need to implement any retry logic yourself.

This module has a reasonable set of defaults.  It also allows you
to configure many aspects of the transfer process including:

* Multipart threshold size
* Max parallel downloads
* Max bandwidth
* Socket timeouts
* Retry amounts

There is no support for s3->s3 multipart copies at this
time.


.. _ref_s3transfer_usage:

Usage
=====

The simplest way to use this module is:

.. code-block:: python

    client = boto3.client('s3', 'us-west-2')
    transfer = S3Transfer(client)
    # Upload /tmp/myfile to s3://bucket/key
    transfer.upload_file('/tmp/myfile', 'bucket', 'key')

    # Download s3://bucket/key to /tmp/myfile
    transfer.download_file('bucket', 'key', '/tmp/myfile')

The ``upload_file`` and ``download_file`` methods also accept
``**kwargs``, which will be forwarded through to the corresponding
client operation.  Here are a few examples using ``upload_file``::

    # Making the object public
    transfer.upload_file('/tmp/myfile', 'bucket', 'key',
                         extra_args={'ACL': 'public-read'})

    # Setting metadata
    transfer.upload_file('/tmp/myfile', 'bucket', 'key',
                         extra_args={'Metadata': {'a': 'b', 'c': 'd'}})

    # Setting content type
    transfer.upload_file('/tmp/myfile.json', 'bucket', 'key',
                         extra_args={'ContentType': "application/json"})


The ``S3Transfer`` class also supports progress callbacks so you can
provide transfer progress to users.  Both the ``upload_file`` and
``download_file`` methods take an optional ``callback`` parameter.
Here's an example of how to print a simple progress percentage
to the user:

.. code-block:: python

    class ProgressPercentage(object):
        def __init__(self, filename):
            self._filename = filename
            self._size = float(os.path.getsize(filename))
            self._seen_so_far = 0
            self._lock = threading.Lock()

        def __call__(self, bytes_amount):
            # To simplify we'll assume this is hooked up
            # to a single filename.
            with self._lock:
                self._seen_so_far += bytes_amount
                percentage = (self._seen_so_far / self._size) * 100
                sys.stdout.write(
                    "
%s  %s / %s  (%.2f%%)" % (self._filename, self._seen_so_far,
                                                 self._size, percentage))
                sys.stdout.flush()


    transfer = S3Transfer(boto3.client('s3', 'us-west-2'))
    # Upload /tmp/myfile to s3://bucket/key and print upload progress.
    transfer.upload_file('/tmp/myfile', 'bucket', 'key',
                         callback=ProgressPercentage('/tmp/myfile'))



You can also provide a TransferConfig object to the S3Transfer
object that gives you more fine grained control over the
transfer.  For example:

.. code-block:: python

    client = boto3.client('s3', 'us-west-2')
    config = TransferConfig(
        multipart_threshold=8 * 1024 * 1024,
        max_concurrency=10,
        num_download_attempts=10,
    )
    transfer = S3Transfer(client, config)
    transfer.upload_file('/tmp/foo', 'bucket', 'key')


N)�NullHandler)�IncompleteReadError�ResponseStreamingError)�ReadTimeoutError)�RetriesExceededError�S3UploadFailedErrorzAmazon Web Servicesz0.14.0c�D�RPR\V444#)�c3�j"�TF)p\P!\P4x�K+	R#5i�N)�random�choice�string�	hexdigits)�.0�_s& �5/usr/lib/python3/dist-packages/s3transfer/__init__.py�	<genexpr>�(random_file_extension.<locals>.<genexpr>�s$���N�<M�q�6�=�=��!1�!1�2�2�<M�s�13)�join�range)�
num_digitss&r�random_file_extensionr�s��
�7�7�N�E�*�<M�N�N�N�c��VR9d;\VPR4'dVPP4R#R#R#)�	PutObject�disable_callbackN�r�
UploadPart)�hasattr�bodyr��request�operation_name�kwargss&&,r�disable_upload_callbacksr%�s;���4�4�����(�:�:�	���%�%�'�:�4rc��VR9d;\VPR4'dVPP4R#R#R#)r�enable_callbackNr)rr r'r!s&&,r�enable_upload_callbacksr(�s;���4�4�����'�:�:�	���$�$�&�:�4rc��]tRt^�tRtR#)�QueueShutdownError�N)�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r+rrr*r*�s��rr*c�a�]tRt^�toRRlt]RRl4tRtRRltRt	Rt
RtR	tR
t
RtRtR
tRtRtVtR#)�
ReadFileChunkNc���WnW nVPVPVVVR7VnVPP	VP4^VnWPnW`nR#)a�

Given a file object shown below:

    |___________________________________________________|
    0          |                 |                 full_file_size
               |----chunk_size---|
         start_byte

:type fileobj: file
:param fileobj: File like object

:type start_byte: int
:param start_byte: The first byte from which to start reading.

:type chunk_size: int
:param chunk_size: The max chunk size to read.  Trying to read
    pass the end of the chunk size will behave like you've
    reached the end of the file.

:type full_file_size: int
:param full_file_size: The entire content length associated
    with ``fileobj``.

:type callback: function(amount_read)
:param callback: Called whenever data is read from this object.

)�requested_size�
start_byte�actual_file_sizeN)�_fileobj�_start_byte�_calculate_file_size�_size�seek�_amount_read�	_callback�_callback_enabled)�self�fileobjr5�
chunk_size�full_file_size�callbackr's&&&&&&&r�__init__�ReadFileChunk.__init__�sd��J �
�%���.�.��M�M�%�!�+�	/�
��
�	
�
�
���4�+�+�,����!��!0�rc��\VR4p\P!VP44PpV!WbW7WE4#)a�Convenience factory function to create from a filename.

:type start_byte: int
:param start_byte: The first byte from which to start reading.

:type chunk_size: int
:param chunk_size: The max chunk size to read.  Trying to read
    pass the end of the chunk size will behave like you've
    reached the end of the file.

:type full_file_size: int
:param full_file_size: The entire content length associated
    with ``fileobj``.

:type callback: function(amount_read)
:param callback: Called whenever data is read from this object.

:type enable_callback: bool
:param enable_callback: Indicate whether to invoke callback
    during read() calls.

:rtype: ``ReadFileChunk``
:return: A new instance of ``ReadFileChunk``

�rb)�open�os�fstat�fileno�st_size)�cls�filenamer5rArCr'�f�	file_sizes&&&&&&  r�
from_filename�ReadFileChunk.from_filename�s?��D
��4� ���H�H�Q�X�X�Z�(�0�0�	��
�:�(�
�	
rc�(�WC,
p\WR4#r)�min)r?r@r4r5r6�max_chunk_sizes&&&&& rr9�"ReadFileChunk._calculate_file_sizes��*�6���>�2�2rc��VfVPVP,
pM'\VPVP,
V4pVPP	V4pV;P\V4,
unVPe-VP'dVP
\V44V#r)r:r<rTr7�read�lenr=r>)r?�amount�amount_to_read�datas&&  rrX�ReadFileChunk.reads����>�!�Z�Z�$�*;�*;�;�N� ����d�.?�.?�!?��H�N��}�}�!�!�.�1�����S��Y�&���>�>�%�$�*@�*@�*@��N�N�3�t�9�%��rc��RVnR#)TN�r>�r?s&rr'�ReadFileChunk.enable_callback s
��!%��rc��RVnR#)FNr_r`s&rr�ReadFileChunk.disable_callback#s
��!&��rc���VPPVPV,4VPe4VP'd"VPWP
,
4WnR#r)r7r;r8r=r>r<)r?�wheres&&rr;�ReadFileChunk.seek&sO���
�
���4�+�+�e�3�4��>�>�%�$�*@�*@�*@��N�N�5�#4�#4�4�5�!�rc�:�VPP4R#r)r7�closer`s&rrh�ReadFileChunk.close-s���
�
���rc��VP#r)r<r`s&r�tell�ReadFileChunk.tell0s��� � � rc��VP#r)r:r`s&r�__len__�ReadFileChunk.__len__3s���z�z�rc��V#rr+r`s&r�	__enter__�ReadFileChunk.__enter__;s���rc�&�VP4R#r)rh)r?�argsr$s&*,r�__exit__�ReadFileChunk.__exit__>s���
�
�rc��\.4#r)�iterr`s&r�__iter__�ReadFileChunk.__iter__As
���B�x�r)r<r=r>r7r:r8)NTr)r,r-r.r/rD�classmethodrQr9rXr'rr;rhrkrnrqruryr0�__classdictcell__��
__classdict__s@rr2r2�s\����01�d�%
��%
�N3�	�&�'�"��!�����rr2c�4a�]tRtRtoRtRRltRtRtVtR#)�StreamReaderProgressiJz<Wrapper for a read only stream that adds progress callbacks.Nc��WnW nR#r)�_streamr=)r?�streamrCs&&&rrD�StreamReaderProgress.__init__Ms����!�rc��VPP!V/VBpVPeVP\V44V#r)r�rXr=rY)r?rtr$�values&*, rrX�StreamReaderProgress.readQs:�����!�!�4�2�6�2���>�>�%��N�N�3�u�:�&��r)r=r�r)	r,r-r.r/�__doc__rDrXr0r|r}s@rr�r�Js����F�"��rr�c�>a�]tRtRtoRtRtRtRtRtRt	Vt
R#)	�OSUtilsiXc�@�\PPV4#r)rI�path�getsize�r?rNs&&r�
get_file_size�OSUtils.get_file_sizeYs���w�w���x�(�(rc�2�\PWW4RR7#)F)r')r2rQ)r?rNr5�sizerCs&&&&&r�open_file_chunk_reader�OSUtils.open_file_chunk_reader\s!���*�*��$�%�+�
�	
rc��\W4#r)rH)r?rN�modes&&&rrH�OSUtils.openas
���H�#�#rc�X�\P!V4R# \dR#i;i)z+Remove a file, noop if file does not exist.N)rI�remove�OSErrorr�s&&r�remove_file�OSUtils.remove_fileds%��	��I�I�h����	��	�s��)�)c�D�\PPW4R#r)�
s3transfer�compat�rename_file)r?�current_filename�new_filenames&&&rr��OSUtils.rename_filems�����%�%�&6�Err+N)r,r-r.r/r�r�rHr�r�r0r|r}s@rr�r�Xs%����)�
�
$��F�Frr�c�ta�]tRtRto.R	Ot]PP3RltRt	Rt
RtRtRt
VtR#)
�MultipartUploaderiqc�6�WnW nW0nW@nR#r)�_client�_config�_os�
_executor_cls�r?�client�config�osutil�executor_clss&&&&&rrD�MultipartUploader.__init__{s��������)�rc�h�/pVP4Fwr4W0P9gKWBV&K	V#r)�items�UPLOAD_PART_ARGS)r?�
extra_args�upload_parts_args�keyr�s&&   r�_extra_upload_part_args�)MultipartUploader._extra_upload_part_args�s;����$�*�*�,�J�C��+�+�+�).�#�&�-�!� rc
��VPP!RRVRV/VBpVR,pVPWqW#WE4pTPPTTTR
T/R7R	# \dfp	\PRRR7TPP
Y#TR7\RPTRPY#.4T	44hR	p	?	ii;i)
�Bucket�Key�UploadIdzBException raised while uploading parts, aborting multipart upload.T��exc_info)r�r�r�zFailed to upload {} to {}: {}�/N�Parts)r�r�r��MultipartUploadr+)r��create_multipart_upload�
_upload_parts�	Exception�logger�debug�abort_multipart_uploadr�formatr�complete_multipart_upload)
r?rN�bucketr�rCr��response�	upload_id�parts�es
&&&&&&    r�upload_file�MultipartUploader.upload_file�s����<�<�7�7�
��
�"�
�&0�
���Z�(�	�	��&�&��V�(��E�"	
���.�.����$�e�,�		/�	
���
	��L�L�-��
�
�

�L�L�/�/���
0�
�&�/�6�6��c�h�h��}�5�q���
��
	�s�A!�!C�,A C�Cc�F�VPV4p.pVPPp	\\P
!VPPV4\V	4,44p
VPPpVPVR7;_uu_4p\P!VPVVVVV	VV4p
VPV
\^V
^,44FpVP!V4K	RRR4V# +'giT#;i���max_workersN)r�r��multipart_chunksize�int�math�ceilr�r��float�max_concurrencyr��	functools�partial�_upload_one_part�mapr�append)r?r�rNr�r�rCr��upload_parts_extra_argsr��	part_size�	num_partsr��executor�upload_partial�parts&&&&&&&        rr��MultipartUploader._upload_parts�s���#'�">�">�z�"J�����L�L�4�4�	���I�I�d�h�h�,�,�X�6��y�9I�I�J�
�	��l�l�2�2��
�
�
�K�
�
8�
8�H�&�.�.��%�%������'��	�N�!���^�U�1�i�!�m�5L�M�����T�"�N�9���9�
8���s
�"A#D�D 	c	��VPPp	V	!WV^,
,WW4;_uu_4p
VPP!RRVRVRVRVRV
/VBpVR,pRVRV/uuRRR4# +'giR#;i)	�r�r�r��
PartNumber�Body�ETagNr+)r�r�r��upload_part)
r?rNr�r�r�r�r�rC�part_number�open_chunk_readerr r��etags
&&&&&&&&&    rr��"MultipartUploader._upload_one_part�s���!�H�H�;�;��
��;��?�3�Y�
�
�
��|�|�/�/������#��'�	�
���
�H��F�#�D��D�,��<�
�
�
�
�s�5A6�6B	)r�r�r�r�N)�SSECustomerKey�SSECustomerAlgorithm�SSECustomerKeyMD5�RequestPayer)r,r-r.r/r��
concurrent�futures�ThreadPoolExecutorrDr�r�r�r�r0r|r}s@rr�r�qs<������ �'�'�:�:�
*�!�
�<�2=�=rr�c�6a�]tRtRtoRtRtRtRtRtVt	R#)�
ShutdownQueuei�aAA queue implementation that can be shutdown.

Shutting down a queue means that this class adds a
trigger_shutdown method that will trigger all subsequent
calls to put() to fail with a ``QueueShutdownError``.

It purposefully deviates from queue.Queue, and is *not* meant
to be a drop in replacement for ``queue.Queue``.

c��RVn\P!4Vn\P
P
W4#)F)�	_shutdown�	threading�Lock�_shutdown_lock�queue�Queue�_init)r?�maxsizes&&rr�ShutdownQueue._init�s-�����'�n�n�.����{�{� � ��/�/rc��VP;_uu_4RVn\PR4RRR4R# +'giR#;i)TzThe IO queue is now shutdown.N)r�r�r�r�r`s&r�trigger_shutdown�ShutdownQueue.trigger_shutdown�s1��
�
 �
 �
 �!�D�N��L�L�8�9�!�
 �
 �
 �s	�<�A
	c���VP;_uu_4VP'd\R4hRRR4\PPW4# +'giL/;i)z6Cannot put item to queue when queue has been shutdown.N)r�r�r*r�r�put)r?�items&&rr�ShutdownQueue.put�sQ���
 �
 �
 ��~�~�~�(�L����!�
�{�{���t�*�*�!�
 �s�A�A+	)r�r�N)
r,r-r.r/r�rrrr0r|r}s@rr�r��s����	�0�:�
+�+rr�c�|a�]tRtRto]P
P3RltRRltRt	Rt
RtRtR	t
R
tVtR#)�MultipartDownloaderic�~�WnW nW0nW@n\	VPP
4VnR#r)r�r�r�r�r��max_io_queue�_ioqueuer�s&&&&&rrD�MultipartDownloader.__init__s/��������)��%�d�l�l�&?�&?�@��
rNc
���VP^R7;_uu_4p\P!VPVVVVV4pVP	V4p	\P!VP
V4p
VP	V
4p\PPW�.\PPR7pVPV4RRR4R# +'giR#;i)�r�)�return_whenN)r�r�r��_download_file_as_future�submit�_perform_io_writesr�r��wait�FIRST_EXCEPTION�_process_future_results)
r?r�r�rN�object_sizer�rC�
controller�download_parts_handler�parts_future�io_writes_handler�	io_future�resultss
&&&&&&&      r�
download_file�!MultipartDownloader.download_files����
�
�A�
�
.�
.�*�&/�%6�%6��-�-������
&�"�&�,�,�-C�D�L� )� 1� 1��'�'��!��#�)�)�*;�<�I� �(�(�-�-��)�&�.�.�>�>�.��G�
�(�(��1�+/�
.�
.�
.�s�B4C�C*	c�@�Vwr#VFpVP4K	R#r)�result)r?r��finished�
unfinished�futures&&   rr�+MultipartDownloader._process_future_results,s��&����F��M�M�O�rc
�D�VPPp\\P!V\V4,44pVPPp\P!VPVVVVVV4p	VPVR7;_uu_4p
\V
PV	\V444RRR4VPP\ 4R# +'giL1;i TPP\ 4i;ir�)r�r�r�r�r�r�r�r�r��_download_ranger��listr�rrr�SHUTDOWN_SENTINEL)r?r�r�rNrrCr�r�r��download_partialr�s&&&&&&     rr�,MultipartDownloader._download_file_as_future1s����L�L�4�4�	���	�	�+��i�0@�"@�A�B�	��l�l�2�2��$�,�,�� � �������
��	1��#�#��#�<�<���X�\�\�"2�E�)�4D�E�F�=�
�M�M���/�0�=�<��
�M�M���/�0�s$�C>�%C+�C>�+C;	�6C>�>!Dc�d�W!,pW#^,
8XdRpMWA,^,
pRVRV2pV#)r�r	zbytes=�-r+)r?r��
part_indexr��start_range�	end_range�range_params&&&&   r�_calculate_range_param�*MultipartDownloader._calculate_range_paramFs>�� �,���Q��&��I�#�/�!�3�I��{�m�1�Y�K�8���rc
��aa�VPWGV4pVPPp	Rp
\V	4F�p\PR4VPPWVR7p\VR,V4oR
oWG,p
\VV3RlR4F1pVPPW�34V
\V4,
p
K3	\PRV4R#	\'V
4h \P\\ \"\$3d)p\PRTTT	RR	7Tp
Rp?EKRp?ii;i \PRT4i;i)NzMaking get_object call.)r�r��Ranger�c�&<�SPS4#r�rX)�buffer_size�streaming_bodys��r�<lambda>�5MultipartDownloader._download_range.<locals>.<lambda>es���� 3� 3�K� @rrz$EXITING _download_range for part: %s�CRetrying exception caught (%s), retrying request, (attempt %s / %s)Tr�i@)r5r��num_download_attemptsrr�r�r��
get_objectr�rxrrrY�socket�timeoutr�rrrr)r?r�r�rNr�r�rCr1r4�max_attempts�last_exception�ir��
current_index�chunkr�r;r<s&&&&&&&&        @@rr*�#MultipartDownloader._download_rangeOs]���+	M��5�5��y��K� �<�<�=�=�L�!�N��<�(�� ��L�L�!:�;�#�|�|�6�6�%�k� 7� �H�&:� ��(�(�&�N�#,�K�$-�$:�M�!%�@�#�"���
�
�)�)�=�*@�A�%��U��3�
�	"�
�(
�L�L�?��L�I)�D'�~�6�6��!�N�N��$�'�*����L�L�>���$�!%�
!��&'�N���!��&
�L�L�?��L�s;�8E
�BC8�E
�+
E
�8*E
�"E�>E
�E
�
E
�
E%c	���VPPVR4;_uu_4pVPP4pV\Jd!\
P
R4RRR4R#VwrEVPV4VPV4Kn \d9p\
P
RTRR7TPP4hRp?ii;i +'giR#;i)�wbTzCShutdown sentinel received in IO handler, shutting down IO handler.Nz!Caught exception in IO thread: %sr�)r�rHr�getr,r�r�r;�writer�r)r?rNrO�task�offsetr\r�s&&     rr�&MultipartDownloader._perform_io_writess���
�X�X�]�]�8�T�
*�
*�a���}�}�(�(�*���,�,��L�L�4���+�
*��'+������v������
��$�����?��%)�%��
�
�
�6�6�8�����+�
*�
*�s/�<C�,&B�C�C�3C�C�C�C+	)r�r�r�rr�r)r,r-r.r/r�r�r�rDr!rrr5r*rr0r|r}s@rrrsA���� �'�'�:�:�A�2�4�
1�*�.M�`�rrc�Pa�]tRtRto^],^
^],^^d3RltRtVtR#)�TransferConfigi�c�B�WnW nW0nW@nWPnR#r)�multipart_thresholdr�r�r@r)r?rTr�r�r@rs&&&&&&rrD�TransferConfig.__init__�s"��$7� �.��#6� �%:�"�(�r)r�rr�rTr@N)r,r-r.r/�MBrDr0r|r}s@rrRrR�s(������F����F���
)�)rrRc�a�]tRtRto.ROt.ROtRRltRtRRltRt	RRlt
RtR	tR
t
RtRtR
tRtRtVtR#)�
S3Transferi�Nc���WnVPPPPRVP4Vf\4pW nVf\4pW0nR#)zbefore-call.s3.*N)	r��meta�events�register�_update_checksum_contextrRr�r��_osutil)r?r�r�r�s&&&&rrD�S3Transfer.__init__�sU��������� � �)�)��� =� =�	
��>�#�%�F����>��Y�F��rc�x�VPR/4pVPR/4pRV9dRVR,R&R#R#)�context�checksum�request_algorithm�header�inN)rL)r?�paramsr$�request_context�checksum_contexts&&,  rr]�#S3Transfer._update_checksum_context�sD�� �*�*�Y��3��*�.�.�z�2�>���"2�2�:B��0�1�$�7�3rc��Vf/pVPWPP4VPPPpVPR\RR7VPR\RR7VPPV4VPP8�dVPWW4V4R#VPWW4V4R#)z�Upload a file to an S3 object.

Variants have also been injected into S3 client, Bucket and Object.
You don't have to use S3Transfer.upload_file() directly.
Nzrequest-created.s3zs3upload-callback-disable)�	unique_idzs3upload-callback-enable)�_validate_all_known_args�ALLOWED_UPLOAD_ARGSr�rZr[�register_firstr%�
register_lastr(r^r�r�rT�_multipart_upload�_put_object)r?rNr�r�rCr�r[s&&&&&& rr��S3Transfer.upload_file�s������J��%�%�j�2J�2J�K����"�"�)�)����� �$�1�	�	
�
	��� �#�0�	�	
�
�L�L�&�&�x�0��|�|�/�/�
0�
�"�"�8�S�J�O����X�s�j�Irc�
�VPPpV!V^VPPV4VR7;_uu_4pVPP!RRVRVRV/VBRRR4R# +'giR#;i)�)rCr�r�r�Nr+)r^r�r�r��
put_object)r?rNr�r�rCr�r�r s&&&&&&  rrq�S3Transfer._put_object�s���!�L�L�?�?��
��
��L�L�&�&�x�0��	
�
�
��L�L�#�#�
��
�#&�
�-1�
�5?�
�

�
�
�
�s�#A1�1B	c��Vf/pVPW@P4VPWV4pV\P,\4,pVP
WWvWE4VPPWs4R# \d6\PRTRR7TPPT4hi;i)z�Download an S3 object to a file.

Variants have also been injected into S3 client, Bucket and Object.
You don't have to use S3Transfer.download_file() directly.
Nz<Exception caught in download_file, removing partial file: %sTr�)
rl�ALLOWED_DOWNLOAD_ARGS�_object_sizerI�extsepr�_download_filer^r�r�r�r�r�)r?r�r�rNr�rCr�
temp_filenames&&&&&&  rr!�S3Transfer.download_files������J��%�%�j�2L�2L�M��'�'��Z�@�� �2�9�9�,�/D�/F�F�
�
	>�����]��
�
�L�L�$�$�]�=���	��L�L�N���
�
�

�L�L�$�$�]�3��	�s
�B�ACc��W@PP8�dVPWW4WV4R#VPWW5V4R#r)r�rT�_ranged_download�_get_object)r?r�r�rNrr�rCs&&&&&&&rr{�S3Transfer._download_file's=���,�,�:�:�:��!�!��X�J�
�
���V�(��Irc	�d�VF)pW29gK\RVRRPV424h	R#)zInvalid extra_args key 'z', must be one of: z, N)�
ValueErrorr)r?�actual�allowed�kwargs&&& rrl�#S3Transfer._validate_all_known_args1s?���E��#� �.�u�g�6'�'+�y�y��'9�&:�<���rc��\VPVPVP4pVP	WW4WV4R#r)rr�r�r^r!)r?r�r�rNrr�rC�
downloaders&&&&&&& rr�S3Transfer._ranged_download9s8��)��L�L�$�,�,����
�
�	� � ���
�	
rc
�<�VPPpRp\V4FpVPWW4V4u#	\V4h \P
\\\\3d(p	\PRT	TTRR7T	pRp	?	KrRp	?	ii;i)Nr?Tr�)
r�r@r�_do_get_objectrBrCr�rrrr�r�r)
r?r�r�rNr�rCrDrErFr�s
&&&&&&    rr��S3Transfer._get_objectCs����|�|�9�9�����|�$�A�
��*�*���x���%�0#�>�2�2��%���� �#�&��
����:��� �!�
��"#����%
�s�A
�
*B�4B�Bc�@a	�VPP!RRVRV/VBp\VR,V4o	VPP	VR4;_uu_4p\V	3RlR4FpVP
V4K	RRR4R# +'giR#;i)r�r�r�rKc�&<�SPR4#)i r:)r<s�rr=�+S3Transfer._do_get_object.<locals>.<lambda>gs���n�&9�&9�$�&?rrNr+)r�rAr�r^rHrxrM)
r?r�r�rNr�rCr�rOrHr<s
&&&&&&   @rr��S3Transfer._do_get_objectas�����<�<�*�*�
��
�"�
�&0�
��.�h�v�.>��I��
�\�\�
�
�x��
.�
.�!��?��E�������F�/�
.�
.�
.�s�)B�B	c�P�VPP!RRVRV/VBR,#)r�r��
ContentLengthr+)r��head_object)r?r�r�r�s&&&&rry�S3Transfer._object_sizejs.���|�|�'�'�M�v�M�3�M�*�M��
�	
rc��\VPVPVP4pVP	WW4V4R#r)r�r�r�r^r�)r?rNr�r�rCr��uploaders&&&&&& rrp�S3Transfer._multipart_uploados.��$�T�\�\�4�<�<����N�����X�s�j�Ir)r�r�r^)�	VersionIdr�r�r�r�)�ACL�CacheControl�ContentDisposition�ContentEncoding�ContentLanguage�ContentType�Expires�GrantFullControl�	GrantRead�GrantReadACP�
GrantWriteACL�Metadatar��ServerSideEncryption�StorageClassr�r�r��SSEKMSKeyId�SSEKMSEncryptionContext�Tagging)NN)r,r-r.r/rxrmrDr]r�rqr!r{rlrr�r�ryrpr0r|r}s@rrXrX�s[��������0
�C�J�<�>�>J��
�3�<�
�
J�JrrXi)�).r��concurrent.futuresr�r��loggingr�rIr�rrBrr�r�botocore.exceptionsrr�urllib3.exceptionsr�s3transfer.compatr��s3transfer.exceptionsrr�
__author__�__version__�	getLoggerr,r��
addHandlerrV�objectr,rr%r(r�r*r2r�r�r�rr�rrRrXr+rr�<module>r�s���p�d����	��
�
�
���K���K�
"�
���
�	�	�8�	$�����+�-� ����H��O�(�'�	��	�S�S�l��F�F�2n=�n=�b+�E�K�K�+�DQ�Q�h
)�
)� IJ�IJr

Youez - 2016 - github.com/yon3zu
LinuXploit