Installing salesforce python toolkit

Installing salesforce python toolkit on a debian machine in order to access the Salesforce API. Follow the 3 steps:

1. Download the toolkit from

2. Install Suds (Python SOAP Client):

sudo apt-get install python-setuptools

3. Install the salesforce python toolkit using the provided in the tar:

sudo python install

Installation is now complete. Execute the following test script to validate the setup and salesforce connectivity:


from sforce.enterprise import SforceEnterpriseClient
h = SforceEnterpriseClient('Company_Enterprise_Sandbox.wsdl.xml')
h.login('', 'account_password', 'xxxxSecurityTokenxxxx')
result = h.query('SELECT ID,Name,Customer_Number__c FROM Account LIMIT 10')
print type(result)
for record in result.records:
    print record.Id, record.Customer_Number__c, record.Name

PS: The PHP toolkit can be installed and configured easily as well. Refer to the documentation here:


One thought on “Installing salesforce python toolkit

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.