Last active
December 26, 2015 22:19
-
-
Save spiette/7221950 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import urllib2 | |
import json | |
url = 'http://localhost:8080/v3/nodes' | |
r = urllib2.Request(url) | |
r.add_header('Accept', 'application/json') | |
u = urllib2.urlopen(r) | |
for i in sorted(json.load(u), key = lambda o: o['facts_timestamp']): | |
print( "%-24s %s" % ( i['name'], i['facts_timestamp'])) | |
u.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment