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
Function like urllib.urlretrieve for downloading files #885
Comments
You can write a file without loading it into memory currently:
|
Nice to know but still I would prefer short one-liner over 4 lines. |
This isn't about lines of code — it's about concise, succinct code. There is little value and many disadvantages of having a library write to files directly on your behalf. |
Thank you for reply. I'll leave this to more experienced than me and use your code.
Best regards |
Sorry, I hadn't had any coffee yet :) |
For latest version(Edit: v2+) of requests:
|
@amitt001 That should work in the current version v2.10.0, and indeed in all of the v2.X.X series release. |
Hello,
I would like to request function for downloading files.
Something like:
r = requests.get_file('https://example.com/big_file.zip', 'path_to_file')
I'm looking for it mainly for downloading big files (over 1GB), without fully loading them to memory.
Best regards
The text was updated successfully, but these errors were encountered: