5 ms·
The huge win against requests is that Https is fully async.. you can download 20 files in parallel without not too much effort. Throughout in python asyncio is
by jordic 7y ago
The huge win against requests is that Https is fully async.. you can download 20 files in parallel without not too much effort.
Throughout in python asyncio is amazing, something similar to node or perhaps better... That's the main point.
- westurner 7y agoFWIW, requests3 has "Type-annotations for all public-facing APIs", asyncio, HTTP/2, connection pooling, timeouts, etc https://github.com/kennethreitz/requests3 https://github.com/kennethreitz/requests3
- ehsankia 7y agoRelevant blog and discussion: https://vorpus.org/blog/why-im-not-collaborating-with-kenneth-reitz/ https://vorpus.org/blog/why-im-not-collaborating-with-kennet... https://news.ycombinator.com/item?id=19826680 https://news.ycombinator.com/item?id=19826680
- jordic 7y agoSorry, have you checked the source? Are these features there or only announced? Has requests added a timeout by default finally?
- westurner 7y agoIt looks like requests is now owned by PSF. https://github.com/psf/requests https://github.com/psf/requests But IDK why requests3 wasn't transferred as well, and why issues appear to be disabled on the repo now. The docs reference a timeout arg (that appears to default to the socket default timeout) for connect and/or read https://3.python-requests.org/user/advanced/#timeouts https://3.python-requests.org/user/advanced/#timeouts And the tests reference a timeout argument. If that doesn't work, I wonder how much work it would be to send a PR (instead of just talking s to Ken and not contributing any code)
- jordic 7y ago>But IDK why requests3 wasn't transferred as well, and That's thing... Who knows..
- westurner 7y agoTIL requests3 beta works with httpx as a backend: https://github.com/not-kennethreitz/team/issues/21#issuecomment-573298349 https://github.com/not-kennethreitz/team/issues/21#issuecomm... If requests3 is installed, `import requests' imports requests3