Progress Bar while download file over http with Requests
<p>I need to download a sizable (~200MB) file. I figured out how to download and save the file with <a href="https://stackoverflow.com/questions/16694907/how-to-download-large-file-in-python-with-requests-py">here</a>. It would be nice to have a progress bar to know how much has been downloaded. I found <a href="http://progressbar-2.readthedocs.io/en/latest/usage.html" rel="noreferrer">ProgressBar</a> but I'm not sure how to incorperate the two together. </p>

<p>Here's the code I tried, but it didn't work.</p>

<pre><code>bar = progressbar.ProgressBar(max_value=progressbar.UnknownLength)
with closing(download_file()) as r:
    for i in range(20):
        bar.update(i)
</code></pre>