def download_stash(repo=DEFAULT_REPO, branch=DEFAULT_BRANCH, outpath=TEMP_ZIPFILE, verbose=False):
    """
    Download the StaSh zipfile from github.
    :param repo: user owning the repo to download from
    :type repo: str
    :param branch: branch to download
    :type branch: str
    :param verbose: if True, print additional information
    :type verbose: bool
    """
    url = URL_TEMPLATE.format(repo, branch)
    if verbose:
        print('Downloading {} ...'.format(url))
    r = requests.get(url, stream=True)
    file_size = r.headers.get('Content-Length')
    if file_size is not None:
        file_size = int(file_size)

    with open(outpath, 'wb') as outs:
        block_sz = 8192
        for chunk in r.iter_content(block_sz):
            outs.write(chunk)

    Download the StaSh zipfile from github.
    :param repo: user owning the repo to download from
    :type repo: str
    :param branch: branch to download
    :type branch: str
    :param verbose: if True, print additional information
    :type verbose: bool
    
getstash.py