parameters: (self, bucket, key, filename, extra_args=None,
                        callback=None)
docstring: 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.
  
          .. seealso::
              :py:meth:`S3.Client.download_file`
              :py:meth:`S3.Client.download_fileobj`
docstring_summary: Download an S3 object to a file.
docstring_tokens: Download an S3 object to a file .
function: def download_file(self, bucket, key, filename, extra_args=None,
                        callback=None):
          """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.
  
          .. seealso::
              :py:meth:`S3.Client.download_file`
              :py:meth:`S3.Client.download_fileobj`
          """
          if not isinstance(filename, six.string_types):
              raise ValueError('Filename must be a string')
  
          subscribers = self._get_subscribers(callback)
          future = self._manager.download(
              bucket, key, filename, extra_args, subscribers)
          try:
              future.result()
          # This is for backwards compatibility where when retries are
          # exceeded we need to throw the same error from boto3 instead of
          # s3transfer's built in RetriesExceededError as current users are
          # catching the boto3 one instead of the s3transfer exception to do
          # their own retries.
          except S3TransferRetriesExceededError as e:
              raise RetriesExceededError(e.last_exception)
function_tokens: def download_file ( self , bucket , key , filename , extra_args = None , callback = None ) : if not isinstance ( filename , six . string_types ) : raise ValueError ( 'Filename must be a string' ) subscribers = self . _get_subscribers ( callback ) future = self . _manager . download ( bucket , key , filename , extra_args , subscribers ) try : future . result ( ) # This is for backwards compatibility where when retries are # exceeded we need to throw the same error from boto3 instead of # s3transfer's built in RetriesExceededError as current users are # catching the boto3 one instead of the s3transfer exception to do # their own retries. except S3TransferRetriesExceededError as e : raise RetriesExceededError ( e . last_exception )