python library for file upload and persistent connections? [closed]
-
24-09-2019 - |
Question
I tried urllib{2}, pycurl and I'm looking at twisted's new http client. But:
- I found urllib2 difficult to perform a file upload
- pycurl multi looks right but unpythonic
- twisted's http client does not support persistent connection (didn't check the file upload capability)
Is there any other alternative?
Solution
PiCloud's library uses urllib2_file which easily does upload via multipart data. I forget where we got the module (we later modified it). the urllib2_file is covered under a BSD license.
OTHER TIPS
I rolled my own on top of httplib
before discovering urllib3, which does both of these things.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow