DESCRIPTION.rst 571 B

1234567891011121314151617181920212223242526272829
  1. GRequests allows you to use Requests with Gevent to make asynchronous HTTP
  2. Requests easily.
  3. Usage
  4. -----
  5. Usage is simple::
  6. import grequests
  7. urls = [
  8. 'http://www.heroku.com',
  9. 'http://tablib.org',
  10. 'http://httpbin.org',
  11. 'http://python-requests.org',
  12. 'http://kennethreitz.com'
  13. ]
  14. Create a set of unsent Requests::
  15. >>> rs = (grequests.get(u) for u in urls)
  16. Send them all at the same time::
  17. >>> grequests.map(rs)
  18. [<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]