auth = base64.encodestring('%s:%s' % (username, password)).replace('\n', '')
data = json.dumps({'transition': {'id': 1000}, 'update': {'comment': [{
    'add': {'body': comment}}]}})
request = urllib.request.Request(url, data, {'Authorization': 'Basic %s' % auth,
    'Content-Type': 'application/json'})
print(urllib.request.urlopen(request).read())
Perform JIRA transition via Python REST API