3 ms·
Keep-alive is 100% supported in the upcoming v0.7.0 release, along with async i/o :) Caching: I think that will be best be served by a hook/helper module, but
by kenneth_reitz 15y ago
Keep-alive is 100% supported in the upcoming v0.7.0 release, along with async i/o :)
Caching: I think that will be best be served by a hook/helper module, but we'll see.
- samps 15y agoCool! Is there anything I can look at to see how async I/O will work? Does all the async support depend on gevent monkey patching (as requests/async.py would suggest)?
- kenneth_reitz 15y agoIt's unreleased, and therefore completely undocumented at the moment. But here's the API: https://github.com/kennethreitz/requests/issues/98 https://github.com/kennethreitz/requests/issues/98
- st3fan 15y agoMmm async. Does that also mean that it will have better support for timeouts? I'm not interested in socket timeouts, more in a 'finish this in N seconds or just give up' thing. For that reason I am using pycurl now for some stuff where I had previously used the requests library. Which has a really really horrible API :-/
- simonw 15y agoThe most interesting thing about caching is that you also get support for 304/Etags/Last-Modified - which is amazingly useful for any application that might hit the same URL more than once. I'd vote for that logic in requests core, with caching as a key/value interface (ship an in-memory or file-based default, but make it easy to hook in memcached/redis/etc ala Django).