ecoscope.io.utils#

Module Contents#

ecoscope.io.utils.download_file(url, path, retries=2, overwrite_existing=False, chunk_size=1024, unzip=False, **request_kwargs)[source]#

Download a file from a URL to a local path. If the path is a directory, the filename will be inferred from the response header

Parameters:
  • url (str)

  • path (str)

  • retries (int)

  • overwrite_existing (bool)

  • chunk_size (int)

  • unzip (bool)

Return type:

None

ecoscope.io.utils.__is_gdrive_url(url)[source]#
Parameters:

url (str)

Return type:

re.Match | None

ecoscope.io.utils.__is_dropbox_url(url)[source]#
Parameters:

url (str)

Return type:

re.Match | None

ecoscope.io.utils.__transform_gdrive_url(url)[source]#
Parameters:

url (str)

Return type:

str

ecoscope.io.utils.__transform_dropbox_url(url)[source]#
Parameters:

url (str)

Return type:

str