import urllib.request import json # Get all projects req = urllib.request.Request('http://localhost:37821/api/projects') resp = urllib.request.urlopen(req) projects = json.loads(resp.read().decode()) print('Total projects:', len(projects)) for p in projects: print(' id={} name={} coverImage={} reportCount={}'.format( p['id'], p['name'], p['coverImage'], p['reportCount']))