5

I'm able to successfully retrieve results using Exact Target's Python FuelSDK, but can't figure out the format of the response.results object or how to parse it.

It looks like JSON... but not quite.

Does anyone know what format it's in, or if it's not a standard format, can anyone point me to an existing parser?

An example of response for a Send object (getResponse.results in many of the SDK's code samples):

    [(Send){
       Client = 
          (ClientID){
             ID = 1966311
          }
       PartnerKey = None
       PartnerProperties[] = 
          (APIProperty){
             Name = "BCCEmail"
             Value = None
          },
       CreatedDate = 2012-04-17 11:04:00
       ModifiedDate = 2012-04-17 11:04:58.000001
       ID = 11099
       ObjectID = None
       Email = 
          (Email){
             PartnerKey = None
             ID = 6511
             ObjectID = None
          }
       SendDate = 2012-04-17 11:04:00
       FromAddress = "[email protected]"
       FromName = "Person 1"
       Duplicates = 0
       InvalidAddresses = 0
       ExistingUndeliverables = 0

etc. etc.

1 Answer 1

3

This looks like a Python object returned by the suds package, which is what the Fuel-SDK uses to make SOAP requests.

If the code snippet you posted is what is stored in response.Results, you should be able to access the values like this:

for send in response.Results:
    print send.SendDate

Or like this:

print response.Results[0].SendDate

If you want to serialize a suds object, you may want to take a look at these posts: https://stackoverflow.com/questions/2412486/serializing-a-suds-object-in-python https://stackoverflow.com/questions/2167894/how-can-i-pickle-suds-results

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .