neurotic.datasets.download

The neurotic.datasets.download module implements a general purpose download function that handles connecting to remote servers, performing authentication, and downloading files with progress reporting. The function handles various errors and will automatically reprompt the user for login credentials if a bad user name or password is given.

The module installs an urllib.request.HTTPBasicAuthHandler and a neurotic.datasets.ftpauth.FTPBasicAuthHandler at import time.

neurotic.datasets.download.download(url, local_file, overwrite_existing=False, show_progress=True, bytes_per_chunk=8192)[source]

Download a file.