-
-
Notifications
You must be signed in to change notification settings - Fork 466
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
Progress bar for downloads #389
Conversation
Hello @Mandera! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2022-07-30 07:39:30 UTC |
Hardcoded the "[WDM] - " prefix for the progress bar as I think making tqdm use the logger's formatting dynamically isn't feasible. Added tqdm to install_requires in setup.py (In addition to Pipfile).
|
Well, I think that this approach shold be just documented. I dont want to add 3rd party dependency and have a progress bar enabled by default |
Yeah makes sense to have it disabled by default, add a parameter Are you open to making tqdm an optional dependency? Such as |
Yes, making it optional is a great idea |
After opening #388 I thought I could try doing it myself, this is the result!
The only modified part is
WDMHttpClient.get
requests.get
'sstream
parameter to TrueContent-Length
exists in the response header and if it's greater than 100_content
in the response objectHere's an example of how it looks
![progress](https://user-images.githubusercontent.com/5393746/173235384-f6bfc812-5802-41bf-bc6e-8008c6ba4656.png)
Thank you