def _download_file(url, local_filename):
    response = requests.get(url, stream=True)
    with open(local_filename, 'wb') as outfile:
        for chunk in response.iter_content(chunk_size=1024):
            if chunk: # filter out keep-alive new chunks
                outfile.write(chunk)
Utility function that downloads a chunked response from the specified url to a local path.
dataset/ETHPy150Open xmunoz/sodapy/sodapy/__init__.py/_download_file