This command line appplication is written in Python. This app allows CRUD operations against Salesforce bulk API: http://www.salesforce.com/us/developer/docs/api_asynch/index.htm
- Standalone app
- The app does not require additional libraries
- Code seperation
- bulkly.py - the CLI wrapper is sepearted from sf_bulk.py - the Salesforce bulk API wrapper
- Multi-Python
- compatible with Python v 2.6, 2.7, 3.2, and 3.3
- Include easily in other Python apps
- sf_bulk.py can be easily included in other Python apps. Refer to comments in the file.
In your terminal, go to the bulkly folder
cd bulkly
Then run the following
python bulkly.py --user [User Name] --pw [Password] --token [Token] --sandbox [sandbox]
Example
python bulkly.py --user [email protected] --pw FORCE2012 --token GGrFnoIJutesEweBNPxyCihx2
Choice 1 - Create Job
prompt: jobOperation, jobObject, jobType
Choice 2 - Get Job
prompt: jobId
Choice 3 - Close Job
prompt: jobId
Choice 4 - Abort Job
prompt: jobId
Choice 5 - Add Batch
prompt: jobId, fileName, fileType
Choice 6 - Get Batches
prompt: jobId
Choice 7 - Get Batch
prompt: jobId, batchId
Choice 8 - Get Batch Request
prompt: jobId, batchId
Choice 9 - Get Batch Request
prompt: jobId, batchId
The app has following structure:
bulkly.py the CLI app libs/requests python requests library libs/sf_bulk.py python wrapper for Salesforce bulk API
The file bulkly.py is the CLI app which renders menu, processes user choices and calls Salesforce bulk api. The requests library does http requests to Salesforce API endpoints. The sf_bulk library is a simple wrapper for Salesforce bulk API.