Download Utilities

Utility functions for downloading data.

Based on

Kuchumov, A. pyuplift: Lightweight uplift modeling framework for Python. (2019). URL: https://github.com/duketemon/pyuplift. License: https://github.com/duketemon/pyuplift/blob/master/LICENSE.

Contents

download_file, get_download_paths

causeinfer.data.download_utils.download_file(url: str, output_path: str, zip_file=False)[source]

Downloads a file from a url to a specified path.

Parameters:
urlstr

the URL from which the file can be downloaded from.

output_pathstr

a user specified path, which defaults to a ‘files’ folder in the cwd.

causeinfer.data.download_utils.get_download_paths(file_path, file_directory='files', file_name='file')[source]

Derives paths for a file folder and a file.

Parameters:
pathstr

A user specified path that the data should go to

file_directorystr (default=files)

A user specified directory.

file_namestr (default=file)

The name to call the file.