{ "info": { "author": "Chris Guidry", "author_email": "cguidry@oreilly.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Office/Business :: Groupware", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "salesforce_bulk_api\n===================\n\nThis library provides a simple wrapper to the [Salesforce Bulk API](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/),\nwhich offers a very fast method to create, update, delete, or even upsert large\nnumbers of Salesforce records asynchronously.\n\nInstallation\n============\n\n`salesforce_bulk_api` has been testing on Python 2.7, 3.1, 3.3, 3.4, and pypy.\nAt runtime, it depends on [requests](http://docs.python-requests.org/en/latest/)\nand [simple_salesforce](https://github.com/heroku/simple-salesforce) (to handle\nauthentication).\n\n```\n$ pip install salesforce_bulk_api\n```\n\nUsage\n=====\n\n```\nfrom salesforce_bulk_api import SalesforceBulkJob\n\njob = SalesforceBulkJob('update', 'Contact')\njob.upload(\n ['Id', 'FirstName', 'LastName', 'Your_Custom_Field__c'],\n [\n ('CONTACT-1', 'Hello', 'World', 'My Custom Value'),\n ('CONTACT-2', 'Goodbye', 'Moon', 'Another Custom Value'),\n ....\n ]\n)\n```\n\nThe arguments to create a `SalesforceBulkJob` are the action ('create',\n'update', 'delete', 'upsert') and the Salesforce object name (like 'Lead' or\n'Contact' or 'Opportunity').\n\nThe first argument to `upload` is a list of column headers, using the Salesforce\ntechnical field names for the object. You can find these in your Salesforce\nunder \"Setup\" -> \"Customize\" -> The Object Type.\n\nThe second argument to `upload` is *any iterable* (you can use a generator to\nkeep your memory usage lower!) of `tuple`s containing the field values.\n\n`SalesforceBulkJob` will split your input into batches, upload them to Salesforce,\nand wait for all of the batches to successfully complete. If you are interested\nin the results, you can make a call to `.results()` after your initial call to\n`.upload()`.\n\nLogging\n=======\n\nBecause the upload to Salesforce is a fairly complicated operation, this library\nperforms extensive INFO-level logging to the logger named 'salesforce_bulk_api'.\nYou may want to turn this level up or down depending on your needs and your\nlogging configuration.\n\n\nAuthentication with Salesforce\n==============================\n\n`salesforce_bulk_api` is configured with environment variables, which you can\nprovide externally to running your Python program, or by setting keys in\n`os.environ`. The variables are as follows:\n\n```\nSALESFORCE_INSTANCE=...the domain name of your Salesforce instance, like abc123.salesforce.com...\nSALESFORCE_SANDBOX=...the string \"True\" or \"False\", indicating whether this is a Salesforce sandbox instance...\nSALESFORCE_USERNAME=...a valid Salesforce user with permissions to create and manage bulk jobs...\nSALESFORCE_PASSWORD=...the Salesforce user's password...\nSALESFORCE_SECURITY_TOKEN=...the Salesforce user's security token (which you get from the Salesforce user interface)...\n```\n\n\nLicense\n=======\n\nLicensed under the BSD 3-clause license.\n\n> Copyright (c) 2015, Safari Books Online\n> All rights reserved.\n>\n> Redistribution and use in source and binary forms, with or without\n> modification, are permitted provided that the following conditions are met:\n> * Redistributions of source code must retain the above copyright\n> notice, this list of conditions and the following disclaimer.\n> * Redistributions in binary form must reproduce the above copyright\n> notice, this list of conditions and the following disclaimer in the\n> documentation and/or other materials provided with the distribution.\n> * Neither the name of the Safari Books Online nor the\n> names of its contributors may be used to endorse or promote products\n> derived from this software without specific prior written permission.\n>\n> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n> ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n> WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n> DISCLAIMED. IN NO EVENT SHALL Safari Books Online BE LIABLE FOR ANY\n> DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n> (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n> ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n> (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n> SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/safarijv/salesforce-bulk-api", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "salesforce_bulk_api", "package_url": "https://pypi.org/project/salesforce_bulk_api/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/salesforce_bulk_api/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/safarijv/salesforce-bulk-api" }, "release_url": "https://pypi.org/project/salesforce_bulk_api/1.2.0/", "requires_dist": null, "requires_python": null, "summary": "A Python 2 and 3 interface to the Salesforce Bulk API.", "version": "1.2.0" }, "last_serial": 2486334, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "9e8153940f61d1a0bdc46d78d40544c8", "sha256": "7e7140fe61d4bf5b35aebc2bd68d4940418f6369ddafeb5212f6e31918d8b09b" }, "downloads": -1, "filename": "salesforce_bulk_api-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9e8153940f61d1a0bdc46d78d40544c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10430, "upload_time": "2015-10-21T23:32:01", "url": "https://files.pythonhosted.org/packages/1b/04/cec0c3c03a81e28f19dd6779728ae0baf221e17000eb40169d2808e0a091/salesforce_bulk_api-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "a50895f09e2581f9070e8efcea3ee65f", "sha256": "91369b81f474adad4ff1bd100503dee9a4808e97f1c32cbfee81cfc47a3b6270" }, "downloads": -1, "filename": "salesforce_bulk_api-1.1.0.tar.gz", "has_sig": false, "md5_digest": "a50895f09e2581f9070e8efcea3ee65f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10432, "upload_time": "2016-09-26T15:55:28", "url": "https://files.pythonhosted.org/packages/68/cf/dbf41476df84074a8ee67d59025c72e04fc223b1f4866febcd6712921248/salesforce_bulk_api-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "f9b2bea9453f2e59eeb4cddc9dc5e0ce", "sha256": "ad83eae3eb8b494868a49e1641013ae1a978c1d603210a2c2ac51399a153dc7c" }, "downloads": -1, "filename": "salesforce_bulk_api-1.1.1.tar.gz", "has_sig": false, "md5_digest": "f9b2bea9453f2e59eeb4cddc9dc5e0ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10427, "upload_time": "2016-10-11T13:42:44", "url": "https://files.pythonhosted.org/packages/d2/ea/9762769653e96b9e9b105f39ef7088019a37b58052e96c1272c90eb35c45/salesforce_bulk_api-1.1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "25724831538c2e76a4ebb3043f4d9a23", "sha256": "ec79f9517854d5c6855a240c47bf5d317c8d8c921d2c9e534d6bd9711169a3c8" }, "downloads": -1, "filename": "salesforce_bulk_api-1.2.0.tar.gz", "has_sig": false, "md5_digest": "25724831538c2e76a4ebb3043f4d9a23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10593, "upload_time": "2016-11-28T13:16:05", "url": "https://files.pythonhosted.org/packages/43/c8/992b5de3222c83255165f2c52d71fab0b8cfdefc153bd5d3c8bf060c6104/salesforce_bulk_api-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "25724831538c2e76a4ebb3043f4d9a23", "sha256": "ec79f9517854d5c6855a240c47bf5d317c8d8c921d2c9e534d6bd9711169a3c8" }, "downloads": -1, "filename": "salesforce_bulk_api-1.2.0.tar.gz", "has_sig": false, "md5_digest": "25724831538c2e76a4ebb3043f4d9a23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10593, "upload_time": "2016-11-28T13:16:05", "url": "https://files.pythonhosted.org/packages/43/c8/992b5de3222c83255165f2c52d71fab0b8cfdefc153bd5d3c8bf060c6104/salesforce_bulk_api-1.2.0.tar.gz" } ] }