This part works:
account = sf.query("SELECT Id,Name FROM Account WHERE Platform_Id__c = \'%s\' " %trx_platform_id)
I am able to get