Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.
/ grequests-oauth Public archive

 GRequests + OAuth: Asynchronous, OAuth'd HTTP requests

Notifications You must be signed in to change notification settings

swinton/grequests-oauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# GRequests + OAuth: Asynchronous, OAuth'd HTTP requests

GRequests + OAuth allows you to make asynchronous, OAuth'd HTTP requests easily.

Magic courtesy of GRequests and requests-oauth.

Usage

See example.py.

Basically:

import grequests

from grequests_oauth import grequests_oauth_client

client = grequests_oauth_client(access_token, access_token_secret, 
                                consumer_key, consumer_secret, 
                                header_auth)

urls = 5 * ['http://api.twitter.com/1/account/rate_limit_status.json']

Create a set of unsent Requests:

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

Send them all at the same time:

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

Installation

Clone:

$ git clone git://github.com/swinton/grequests-oauth.git .

Install requirements:

$ pip install -r requirements.txt

About

 GRequests + OAuth: Asynchronous, OAuth'd HTTP requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages