I was wondering how do you translate something like this using Python Requests? In urllib2, you can manually manipulate the data that is being sent over the wire to the API
import requests import urllib def upload_creative(self, account_id, file_path): files = [('userfile', (file_path, open(file_path, 'rb'), "image/jpeg" ))] url = self._resolve_url('/a/creative/uploadcreative') url = url + "?" + urlib.urlencode(account_id=account_id) reuests.post(url, files=files)