Skip to content

Instantly share code, notes, and snippets.

@GetOsmosis
Created December 16, 2013 02:07
Show Gist options
  • Save GetOsmosis/7981397 to your computer and use it in GitHub Desktop.
Save GetOsmosis/7981397 to your computer and use it in GitHub Desktop.
Connecting to Osmosis Questionnaires with Python
import urllib2
import simplejson
api_key = '<insert your API key here>'
url = 'https://www.getosmosis.com/api/Questionnaires/Draft?key=' + api_key
req = urllib2.Request(url, None, {'user-agent':'osmosis/api'})
opener = urllib2.build_opener()
f = opener.open(req)
print simplejson.load(f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment