download_from_link
- pylluminator.utils.download_from_link(dl_link: str, output_folder: str | MultiplexedPath | PathLike, filename: str | None = None, decompress=False, delete_archive=False) int
Download a file and save it to the target.
Unzip or un-tar the file if it is compressed. Return -1 if the file could not be downloaded, 1 otherwise.
- Parameters:
dl_link (str) – link to the file to be downloaded
output_folder (str) – where the file will be saved
filename (str | None) – specify the expected filename to check if the file already exists before downloaded. Default = None = last part of the dl_link url (after the last slash)
decompress (bool) – set to True to decompress the output (works with .zip and .tar). Default: False
delete_archive (bool) – set to True to delete the archive after decompressing it. Default: False
- Returns:
exit status
- Return type: