ncsw_data.source.base.utility

The ncsw_data.source.base.utility package initialization module.

Submodules

Classes

DataSourceDownloadUtility

The data source download utility class.

Package Contents

class ncsw_data.source.base.utility.DataSourceDownloadUtility

The data source download utility class.

static send_http_get_request(http_get_request_url: str, **kwargs) requests.Response

Send an HTTP GET request.

Parameters:
  • http_get_request_url – The URL of the HTTP GET request.

  • kwargs – The keyword arguments for the adjustment of the following underlying functions: { requests.api.get }.

Returns:

The response to the HTTP GET request.

static download_file(file_url: str, file_name: str, output_directory_path: str | os.PathLike[str]) None

Download a file.

Parameters:
  • file_url – The URL of the file.

  • file_name – The name of the file.

  • output_directory_path – The path to the output directory where the file should be downloaded.