code: def download(self, url, show_status=True):
          
          import requests
  
          file_name = url.split('/')[-1]
          file_path = os.path.join(self.data_directory, file_name)
  
          # Do not download the data if it already exists
          if self.is_downloaded(file_path):
              return file_path
  
          with open(file_path, 'wb') as open_file:
              print('Downloading %s' % url)
              response = requests.get(url, stream=True)
              total_length = response.headers.get('content-length')
  
              if total_length is None:
                  # No content length header
                  open_file.write(response.content)
              else:
                  download = 0
                  total_length = int(total_length)
                  for data in response.iter_content(chunk_size=4096):
                      download += len(data)
                      open_file.write(data)
                      if show_status:
                          done = int(50 * download / total_length)
                          sys.stdout.write('\r[%s%s]' % ('=' * done, ' ' * (50 - done)))
                          sys.stdout.flush()
  
              # Add a new line after the download bar
              sys.stdout.write('\n')
  
          print('Download location: %s' % file_path)
          return file_path
docs: Download a file from the given url.
          Show a progress indicator for the download status.
          Based on: http://stackoverflow.com/a/15645088/1547223