simple_salesforce.util module

Utility functions for simple-salesforce

simple_salesforce.util.call_salesforce(url, method, session, headers, **kwargs)

Utility method for performing HTTP call to Salesforce.

Returns a requests.result object.

simple_salesforce.util.date_to_iso8601(date)

Returns an ISO8601 string from a date

simple_salesforce.util.exception_handler(result, name='')

Exception router. Determines which error to raise for bad results

simple_salesforce.util.getUniqueElementValueFromXmlString(xmlString, elementName)

Extracts an element value from an XML string.

For example, invoking getUniqueElementValueFromXmlString(

‘<?xml version=”1.0” encoding=”UTF-8”?><foo>bar</foo>’, ‘foo’)

should return the value ‘bar’.