download

download_file(url: str, folder: Path, filename: str | None = None) Path[source]

Download a file from a URL.

Parameters:
  • url – URL of the file to download.

  • folder – Path to the directory where the file will be downloaded.

  • filename – Optional name of the file.

extract_tar(file_path: Path, extract_path: Path = None, mode='r:gz') None[source]

Extract files from a tar file.

Parameters:
  • file_path – Path to the tar file.

  • extract_path – Path to the directory where the tar file will be extracted.

  • mode – Mode of the tar file.