iaf.io.utils

Utility functions.

iaf.io.utils.download_file(url: str, target_dir: Path | str = None, local_filename: str = None) Path[source]

Download a file from given URL to target folder and filename.

Parameters:
  • url (str) – URL of the file to dowload.

  • target_dir (str) – Full path where to download the file. If omitted, it will fall back to current path.

  • local_filename (str) – Local name of the downloaded file. If omitted, the file name will be extracted from the URL.

  • from (Adapted)