Skip to content

A simple (g)Requests.session wrapper for throttling, rate-limiting, and retry strategies. This library requires Gevent, as the name implies.

License

Notifications You must be signed in to change notification settings

mikeyy/grequests-throttler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grequests-throttler

A simple (g)Requests.session wrapper for throttling, rate-limiting, and retry strategies. This library requires Gevent, as the name implies.

example

from throttler import ThrottledSession, Strategy

with ThrottledSession(delay_per_request=1,
                      strategy=Strategy.Backoff(),
                      as session:
    for i in range(5):
        response = session.send('http://example.com/', timeout=5)
        if response:
            print response.text

Check example.py for a more thorough example.

About

A simple (g)Requests.session wrapper for throttling, rate-limiting, and retry strategies. This library requires Gevent, as the name implies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages