immunda / erequests

Requests + Eventlet = <3

Home Page:crate.io/packages/erequests/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERequests: Asyncronous Requests

ERequests allows you to use Requests with Eventlet to make asyncronous HTTP Requests easily.

ERequests is a port to Eventlet of Kenneth Reitz's grequests (https://github.com/kennethreitz/grequests)

Usage

Usage is simple:

import erequests

urls = [
    'http://www.heroku.com',
    'http://tablib.org',
    'http://httpbin.org',
    'http://python-requests.org',
    'http://kennethreitz.com'
]

Create a set of unsent Requests:

>>> rs = (erequests.get(u) for u in urls)

Send them all at the same time:

>>> erequests.map(rs)
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]

Installation

Installation is easy with pip:

$ pip install erequests

About

Requests + Eventlet = <3

crate.io/packages/erequests/

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 100.0%