Created
May 5, 2015 15:23
-
-
Save olssonm/53ada210d525f2bc543b to your computer and use it in GitHub Desktop.
Parse JSON from NamnAPI v2 with Python
This file contains 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
from urllib import urlopen | |
import json | |
data = urlopen('http://api.namnapi.se/v2/names.json?limit=10').read() | |
data = json.loads(data) | |
for name in data['names']: | |
print name['firstname'] | |
print name['surname'] | |
print name['gender'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment