Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download_file progress bar #11

Open
jsta opened this issue Jul 23, 2020 · 2 comments
Open

download_file progress bar #11

jsta opened this issue Jul 23, 2020 · 2 comments

Comments

@jsta
Copy link
Contributor

jsta commented Jul 23, 2020

Is there any interest in adding a progress bar to download_file?

Screenshot from 2020-07-23 13-51-14

jsta added a commit to jsta/sciencebasepy that referenced this issue Jul 23, 2020
@MattReimer
Copy link

Absolutely, but it's important to make sure it's optional somehow so if we're capturing output to a log file on a server we can turn it off or make it more useful than 1000 lines of ==============

My own sloppy attempt for our tools is here:
https://github.com/Riverscapes/sqlBRAT/blob/master/lib/util.py#L154-L226

In our case I keep a NO_UI environment variable and then change the behaviour to make it a little more log-friendly. This works for our automation pipelines but you could use something like a boolean parameter too.

@jsta
Copy link
Contributor Author

jsta commented Jul 24, 2020

Makes sense. Sounds like it should be off by default.

jsta added a commit to jsta/sciencebasepy that referenced this issue Jul 24, 2020
jllong-usgs pushed a commit that referenced this issue Mar 17, 2022
* add progressbar to download_file, #11

* make progressbar optional, #11

* extend progress_bar argument to get_item_files

* document progress_bar, handle items with missing content-length header

* attempt content-length header sans encoding

* rm stray formatting flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants