Skip to content

Instantly share code, notes, and snippets.

@fmasanori
Created June 28, 2015 15:54
Show Gist options
  • Save fmasanori/f4184a80952f040b6bb1 to your computer and use it in GitHub Desktop.
Save fmasanori/f4184a80952f040b6bb1 to your computer and use it in GitHub Desktop.
QEdu Busca Simples por Escolas
import urllib.request
import json
url = 'http://educacao.dadosabertosbr.com/api/escolas?nome='
escola = 'embraer'
resp = urllib.request.urlopen(url+escola).read()
resp = json.loads(resp.decode('utf-8'))
for x in resp[1]:
print (x['nome'])
print ('Código:', x['cod'])
print (x['cidade'], x['estado'])
print (x['enemMediaGeral'], x['situacaoFuncionamentoTxt'])
print ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment