Skip to content

Instantly share code, notes, and snippets.

@lavoiesl
Created November 19, 2014 20:02
Show Gist options
  • Save lavoiesl/26ef0bd6725f3b6acf78 to your computer and use it in GitHub Desktop.
Save lavoiesl/26ef0bd6725f3b6acf78 to your computer and use it in GitHub Desktop.
Checking latest version of Composer using Python and GitHub API
#!/usr/bin/python
import urllib2
import json
request = urllib2.urlopen('https://api.github.com/repos/composer/composer/git/refs/heads/master')
obj = json.load(request)
print obj["object"]["sha"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment