obspy.core.util.base.download_to_file

download_to_file(url, filename_or_buffer, chunk_size=1024)[source]

Helper function to download a potentially large file.

Parameters
  • url (str) – The URL to GET the data from.

  • filename_or_buffer (str or file-like object) – The filename_or_buffer or file-like object to download to.

  • chunk_size (int) – The chunk size in bytes.