omicverse.datasets.download_data_requests

omicverse.datasets.download_data_requests(url, file_path=None, dir='./data')[source]

Download data with custom headers to reduce HTTP 403 failures.

Parameters:
  • url (str) – Source URL of the dataset file.

  • file_path (Optional[str]) – Target filename. If None, the basename of url is used.

  • dir (str) – Output directory where file is stored.

Returns:

Local path to downloaded (or cached) file.

Return type:

str