Skip to content

Instantly share code, notes, and snippets.

@mosampaio
Created August 23, 2016 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mosampaio/9b39880d5cf623e231e27d57077ae536 to your computer and use it in GitHub Desktop.
Save mosampaio/9b39880d5cf623e231e27d57077ae536 to your computer and use it in GitHub Desktop.
How to consume a json Rest API with Python using urllib
import urllib.request
url = 'https://api.github.com/repos/twilio/twilio-python/contributors'
response = urllib.request.urlopen(url).read()
print(response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment