I'm currently using Python 2.7 and the requests module to upload files via HTTP POST requests in a little script of mine.
All things considered, the script is doing its job but sometimes the servers on the other end are quite slow and I want to abort the upload process after a certain amount of time (e.g. after 60 seconds). I looked into the timeout function in the requests module but that only applies to the response time of the server, not the actual transmission time period.
So, actually, I've got two questions:
1) Do you know a solution to my problem or an already existing module out there that I could use?
2) Also, do you know if it's a Python problem that upload speeds via Python script are kind of slow compared to uploads using the browser (3-5 Megabyte/s vs. 20-30 Megabytes/s; I'm using a server)?
If this questions is a duplicate, please bear with me. I used the search but no thread was spot-on.