Skip to content

Instantly share code, notes, and snippets.

@jbmohler
Created October 17, 2014 11:51
Show Gist options
  • Save jbmohler/3a270f679b283dcf27a7 to your computer and use it in GitHub Desktop.
Save jbmohler/3a270f679b283dcf27a7 to your computer and use it in GitHub Desktop.
Example with stubs for connecting to Sycamore Education
import json
import requests
import oauthlib
# Do oauth something or other
# https://pypi.python.org/pypi/oauthlib
# See http://docs.python-requests.org/en/latest/user/quickstart/#make-a-request
# replace place-holders -- Python string formatting is cool
r = requests.get('https://app.sycamoreeducation.com/api/v1/School/:schoolid/Directory/:id')
directory = json.loads(r.text)
# see http://api.sycamoresupport.com/school-endpoint-directory-family
for student in directory['Students']:
print student['FirstName'], student['Grade']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment