Skip to content

Instantly share code, notes, and snippets.

import urllib.request
import json
def analisa_detalhe(cod):
url = 'http://educacao.dadosabertosbr.com/api/escola/'
resp = urllib.request.urlopen(url+str(cod)).read()
resp = json.loads(resp.decode('utf-8'))
if int(resp['salasExistentes']) > 1:
print ('Salas Existentes:', resp['salasExistentes'])
print ('Funcionários:', resp['funcionarios'])
#!/usr/bin/env python
"""
=====================================
PEP 20 (The Zen of Python) by example
=====================================
Usage: %prog
:Author: Hunter Blanks, hblanks@artifex.org / hblanks@monetate.com