response.content loads it all into RAM. Write download(url, dest) using stream=True and iter_content(chunk_size=8192), writing chunks to dest in binary mode and returning the byte count written.download(url, 'backup.zip')
total bytes written, file on disk
Chunks flow straight from socket to file.
for chunk in response.iter_content(8192):.
Skip empty keep-alive chunks (if chunk:).