datalad.api.download_url

datalad.api.download_url(urls, path=None, overwrite=False, stop_on_failure=False)

Download content

It allows for a uniform download interface to various supported URL schemes, re-using or asking for authentication detail maintained by datalad.

Examples

$ datalad download http://example.com/file.dat s3://bucket/file2.dat

Parameters:
  • urls (non-empty sequence of str) – URL(s) to be downloaded.
  • path (str or None, optional) – path (filename or directory path) where to store downloaded file(s). In case of multiple URLs provided, must point to a directory. Otherwise current directory is used. [Default: None]
  • overwrite (bool, optional) – flag to overwrite it if target file exists. [Default: False]
  • stop_on_failure (bool, optional) – flag to stop subsequent downloads upon first failure to download. [Default: False]
Returns:

downloaded successfully files

Return type:

list of str