Created
May 22, 2015 15:40
-
-
Save elliottcordo/71a4cbe3e08a772d19ac to your computer and use it in GitHub Desktop.
salesforce export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import beatbox | |
import csv | |
svc = beatbox.PythonClient() | |
svc.login('[email protected]', '*********pHCt4OfKqxtGlnLXM25TotCRv') | |
records = svc.query("SELECT Id, FirstName, LastName FROM Contact") | |
with open('contacts.csv', 'w') as outfile: | |
fp = csv.DictWriter(outfile, records[0].keys()) | |
fp.writeheader() | |
fp.writerows(records) | |
outfile.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment