ci_watson/artifactory_helpers.py
def _download(url, dest, timeout=30):
    """Simple HTTP/HTTPS downloader."""
    # Optional import: requests is not needed for local big data setup.
    import requests

    dest = os.path.abspath(dest)

    with requests.get(url, stream=True, timeout=timeout) as r:
        with open(dest, 'w+b') as data:
            for chunk in r.iter_content(chunk_size=0x4000):
                data.write(chunk)

    return dest
Simple HTTP/HTTPS downloader.
Simple HTTP/HTTPS downloader.
Simple HTTP / HTTPS downloader .
def _download(url, dest, timeout=30):
    import requests
    dest = os.path.abspath(dest)
    with requests.get(url, stream=True, timeout=timeout) as r:
        with open(dest, 'w+b') as data:
            for chunk in r.iter_content(chunk_size=0x4000):
                data.write(chunk)
    return dest
def _download ( url , dest , timeout = 30 ) : import requests dest = os . path . abspath ( dest ) with requests . get ( url , stream = True , timeout = timeout ) as r : with open ( dest , 'w+b' ) as data : for chunk in r . iter_content ( chunk_size = 0x4000 ) : data . write ( chunk ) return dest
Simple HTTP/HTTPS downloader.
Simple HTTP / HTTPS downloader .
"""Simple HTTP/HTTPS downloader.""" # Optional import: requests is not needed for local big data setup.
url
dest
timeout