# https://developer.decibel.net/sample-code-rest-python
import urllib2
import time
import datetime
# Set the request authentication headers
timestamp = datetime.datetime.fromtimestamp(time.time()).strftime('%Y%m%d %H:%M:%S')
headers = {'DecibelAppID': '<Your Application ID>',
'DecibelAppKey': '<Your Application Key>',
'DecibelTimestamp': timestamp}
# Send the GET request
url = 'http://api.decibel.net/v1/Albums/?artist=miles%20davis&format=json'
req = urllib2.Request(url, None, headers)
# Read the response
resp = urllib2.urlopen(req).read()