Skip to content

Instantly share code, notes, and snippets.

Created Nov 27, 2013
What would you like to do?
import erequests
urls = [
# sync API (spawns a new green thread and waits for it)
for url in urls:
print erequests.get(url)
# async API (prepares the requests, they are sent with map/imap)
reqs = [erequests.async.get(url) for url in urls]
print list(erequests.imap(reqs))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment