pylluminator Logo
  • Home
  • Getting started
  • Annotations
  • API
    • annotations
    • cnv
    • dm
    • mask
    • quality_control
    • read_idat
    • sample_sheet
    • samples
    • stats
    • utils
      • column_names_to_snake_case
      • concatenate_non_na
      • convert_to_path
      • download_from_geo
      • download_from_link
        • download_from_link()
      • get_chromosome_number
      • get_column_as_flat_array
      • get_files_matching
      • get_logger
      • get_logger_level
      • get_or_download_file
      • get_resource_folder
      • load_object
      • merge_alt_chromosomes
      • merge_dataframe_by
      • merge_series_values
      • remove_probe_suffix
      • save_object
      • set_channel_index_as
      • set_level_as_index
      • set_logger
    • visualizations
  • Tool comparison
pylluminator
  • API
  • utils
  • download_from_link
  • View page source

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:

int

Previous Next

© Copyright 2025.

Built with Sphinx using a theme provided by Read the Docs.