Fixed Python ApiClient deserialization method and replaced urllib2 with requests