Skip to content

Instantly share code, notes, and snippets.

@cablehead
Last active August 29, 2015 14:18
Show Gist options
  • Save cablehead/faee1015d11614f5e84e to your computer and use it in GitHub Desktop.
Save cablehead/faee1015d11614f5e84e to your computer and use it in GitHub Desktop.
import json
import vanilla
h = vanilla.Hub()
users = ['antirez', 'justinrosenthal', 'jverkoey']
done = (
h.router()
.map(lambda x: x.consume())
.map(json.loads)
.map(lambda x: x['name']))
for user in users:
h.http.get('https://api.github.com/users/'+user).pipe(done)
for i in xrange(len(users)):
print done.recv()
Salvatore Sanfilippo
Justin Rosenthal
Jeff Verkoeyen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment