{ "info": { "author": "Scott Persinger", "author_email": "scottp@heroku.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": ".. figure:: https://travis-ci.org/heroku/salesforce-bulk.svg?branch=master\n :alt: travis-badge\n\nSalesforce Bulk\n===============\n\nPython client library for accessing the asynchronous Salesforce.com Bulk\nAPI.\n\nInstallation\n------------\n\n``pip install salesforce-bulk``\n\nAuthentication\n--------------\n\nTo access the Bulk API you need to authenticate a user into Salesforce.\nThe easiest way to do this is just to supply ``username``, ``password``\nand ``security_token``. This library will use the ``simple-salesforce``\npackage to handle password based authentication.\n\n::\n\n from salesforce_bulk import SalesforceBulk\n\n bulk = SalesforceBulk(username=username, password=password, security_token=security_token)\n ...\n\nAlternatively if you run have access to a session ID and instance\\_url\nyou can use those directly:\n\n::\n\n from urlparse import urlparse\n from salesforce_bulk import SalesforceBulk\n\n bulk = SalesforceBulk(sessionId=sessionId, host=urlparse(instance_url).hostname)\n ...\n\nOperations\n----------\n\nThe basic sequence for driving the Bulk API is:\n\n1. Create a new job\n2. Add one or more batches to the job\n3. Close the job\n4. Wait for each batch to finish\n\nBulk Query\n----------\n\n``bulk.create_query_job(object_name, contentType='JSON')``\n\nUsing API v39.0 or higher, you can also use the queryAll operation:\n\n``bulk.create_queryall_job(object_name, contentType='JSON')``\n\nExample\n\n::\n\n from salesforce_bulk.util import IteratorBytesIO\n import json\n job = bulk.create_query_job(\"Contact\", contentType='JSON')\n batch = bulk.query(job, \"select Id,LastName from Contact\")\n bulk.close_job(job)\n while not bulk.is_batch_done(batch):\n sleep(10)\n\n for result in bulk.get_all_results_for_query_batch(batch):\n result = json.load(IteratorBytesIO(result))\n for row in result:\n print row # dictionary rows\n\nSame example but for CSV:\n\n::\n\n import unicodecsv\n job = bulk.create_query_job(\"Contact\", contentType='CSV')\n batch = bulk.query(job, \"select Id,LastName from Contact\")\n bulk.close_job(job)\n while not bulk.is_batch_done(batch):\n sleep(10)\n\n for result in bulk.get_all_results_for_query_batch(batch):\n reader = unicodecsv.DictReader(result, encoding='utf-8')\n for row in reader:\n print row # dictionary rows\n\nNote that while CSV is the default for historical reasons, JSON should\nbe prefered since CSV has some drawbacks including its handling of NULL\nvs empty string.\n\nPK Chunk Header\n^^^^^^^^^^^^^^^\n\nIf you are querying a large number of records you probably want to turn on `PK Chunking\n`_:\n\n``bulk.create_query_job(object_name, contentType='CSV', pk_chunking=True)``\n\nThat will use the default setting for chunk size. You can use a different chunk size by providing a\nnumber of records per chunk:\n\n``bulk.create_query_job(object_name, contentType='CSV', pk_chunking=100000)``\n\nAdditionally if you want to do something more sophisticated you can provide a header value:\n\n``bulk.create_query_job(object_name, contentType='CSV', pk_chunking='chunkSize=50000; startRow=00130000000xEftMGH')``\n\nBulk Insert, Update, Delete\n---------------------------\n\nAll Bulk upload operations work the same. You set the operation when you\ncreate the job. Then you submit one or more documents that specify\nrecords with columns to insert/update/delete. When deleting you should\nonly submit the Id for each record.\n\nFor efficiency you should use the ``post_batch`` method to post each\nbatch of data. (Note that a batch can have a maximum 10,000 records and\nbe 1GB in size.) You pass a generator or iterator into this function and\nit will stream data via POST to Salesforce. For help sending CSV\nformatted data you can use the salesforce\\_bulk.CsvDictsAdapter class.\nIt takes an iterator returning dictionaries and returns an iterator\nwhich produces CSV data.\n\nFull example:\n\n::\n\n from salesforce_bulk import CsvDictsAdapter\n\n job = bulk.create_insert_job(\"Account\", contentType='CSV')\n accounts = [dict(Name=\"Account%d\" % idx) for idx in xrange(5)]\n csv_iter = CsvDictsAdapter(iter(accounts))\n batch = bulk.post_batch(job, csv_iter)\n bulk.wait_for_batch(job, batch)\n bulk.close_job(job)\n print \"Done. Accounts uploaded.\"\n\nConcurrency mode\n^^^^^^^^^^^^^^^^\n\nWhen creating the job, pass ``concurrency='Serial'`` or\n``concurrency='Parallel'`` to set the concurrency mode for the job.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/heroku/salesforce-bulk", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "salesforce-bulk", "package_url": "https://pypi.org/project/salesforce-bulk/", "platform": "", "project_url": "https://pypi.org/project/salesforce-bulk/", "project_urls": { "Homepage": "https://github.com/heroku/salesforce-bulk" }, "release_url": "https://pypi.org/project/salesforce-bulk/2.1.0/", "requires_dist": [ "requests (>=2.2.1)", "simple-salesforce (>=0.69)", "six", "unicodecsv (>=0.14.1)" ], "requires_python": "", "summary": "Python interface to the Salesforce.com Bulk API.", "version": "2.1.0" }, "last_serial": 4200899, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "dae888ad1dc029e3eae19792de0ccd0e", "sha256": "b2dc4076f1016552f7e77088e57edb33620eb5fe94f83b3d637cb94f59489e25" }, "downloads": -1, "filename": "salesforce-bulk-1.0.0.macosx-10.8-x86_64.exe", "has_sig": false, "md5_digest": "dae888ad1dc029e3eae19792de0ccd0e", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 79419, "upload_time": "2014-03-17T16:42:26", "url": "https://files.pythonhosted.org/packages/5a/12/4e45909abb843a0cce9b9dba80f98171b797e127db0f7249c192ba381600/salesforce-bulk-1.0.0.macosx-10.8-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "8f49a0fcdb3dea1c142a40e20965d799", "sha256": "3a69e9f2e42024f54ee8a1b1bd45c83de0516a04612ce933ef70c7aab01e0176" }, "downloads": -1, "filename": "salesforce-bulk-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8f49a0fcdb3dea1c142a40e20965d799", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10388, "upload_time": "2014-03-17T16:42:24", "url": "https://files.pythonhosted.org/packages/d2/04/8db00b8fb6a86325edad4f1f858132803ef3c494fa91547dcb582bfd7e14/salesforce-bulk-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "d2c7ca1ed33720c589ebf047c9ad3c1e", "sha256": "4e91f745fac2375e05b6833a9fbea9101fde07e8dc2e9a1cea1c771fbca69108" }, "downloads": -1, "filename": "salesforce-bulk-1.0.1.macosx-10.8-x86_64.exe", "has_sig": false, "md5_digest": "d2c7ca1ed33720c589ebf047c9ad3c1e", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 78680, "upload_time": "2014-03-24T22:48:32", "url": "https://files.pythonhosted.org/packages/b7/d3/5e0dadf4dc1bdd1d4ca0bb6958ec336e1edac3f93b3d4a9364d70d2369e8/salesforce-bulk-1.0.1.macosx-10.8-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "15a5a2edb838ff49335fe2a92e2aabba", "sha256": "086799dd74ba27ac47b24307c45b35d59b3af0a656255889c93e03c6daa32853" }, "downloads": -1, "filename": "salesforce-bulk-1.0.1.tar.gz", "has_sig": false, "md5_digest": "15a5a2edb838ff49335fe2a92e2aabba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8526, "upload_time": "2014-03-24T22:48:28", "url": "https://files.pythonhosted.org/packages/b3/d9/4d4a15c28357f2cfe8bab2e9b8195a47c2e059f2d80f3d0e929bf68a8003/salesforce-bulk-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "6b03d448ce1027adc6cad6c8a8a29b77", "sha256": "1a12645b63a6bb0a0f54e782a9231ecdbbaaf89271e1c4df2d029690ba425214" }, "downloads": -1, "filename": "salesforce-bulk-1.0.2.macosx-10.8-x86_64.exe", "has_sig": false, "md5_digest": "6b03d448ce1027adc6cad6c8a8a29b77", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 78825, "upload_time": "2014-04-10T21:46:24", "url": "https://files.pythonhosted.org/packages/70/d6/49c86ac39d36463d924873d25f0aff331d7ee133dbf7588ebe7717f21033/salesforce-bulk-1.0.2.macosx-10.8-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "f6ecd037fc8d28b7955f12069659d822", "sha256": "bfaa6a3d7a068d1c20d94df374ccf500a12233c1f45a3d87adbb016267a5cae3" }, "downloads": -1, "filename": "salesforce-bulk-1.0.2.tar.gz", "has_sig": false, "md5_digest": "f6ecd037fc8d28b7955f12069659d822", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9821, "upload_time": "2014-04-10T21:46:21", "url": "https://files.pythonhosted.org/packages/fd/bc/e724cb8915101b0508791b086228f0805fa379d9fb52a9c4b7cbfa5bbabb/salesforce-bulk-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "3fbe422d7fd02480407ac7890e8784f1", "sha256": "b8ffc54f709244ff1f50ce05b17048a98ea0264037770e890ed26b3a3a8beb67" }, "downloads": -1, "filename": "salesforce-bulk-1.0.3.tar.gz", "has_sig": false, "md5_digest": "3fbe422d7fd02480407ac7890e8784f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9804, "upload_time": "2014-04-25T22:02:09", "url": "https://files.pythonhosted.org/packages/59/b6/4dacddb9c234f57a8b2a79c6d987c3111043d309598af4649c44402b401d/salesforce-bulk-1.0.3.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "a873233a5588d99b88604ca384d96f94", "sha256": "2f469b5c055883257c0ff581ded2201bb3703e731900b71a89ae64d3849454ec" }, "downloads": -1, "filename": "salesforce-bulk-1.0.5.tar.gz", "has_sig": false, "md5_digest": "a873233a5588d99b88604ca384d96f94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10099, "upload_time": "2014-04-28T23:18:33", "url": "https://files.pythonhosted.org/packages/96/7f/1e4b702788be9275406d0f153ff0aa70422319c0b32307a4c09f5b51e587/salesforce-bulk-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "53908c7b2b4bb78e188daaaf6dafeab2", "sha256": "e10242f997a9d1309c8610e3c89a000c388e326da20bc4added258ce71c537fa" }, "downloads": -1, "filename": "salesforce-bulk-1.0.6.tar.gz", "has_sig": false, "md5_digest": "53908c7b2b4bb78e188daaaf6dafeab2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10127, "upload_time": "2014-06-16T21:05:09", "url": "https://files.pythonhosted.org/packages/3b/5a/185fc37ff53128341878f6a420244efac1df3395a418e7510d0a35a07313/salesforce-bulk-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "0f78cb8c69b09b5289eb7e29f6507016", "sha256": "d507970931da58caf22476ef98912489501505fa0b45aaf4187f481bd3d42ab5" }, "downloads": -1, "filename": "salesforce-bulk-1.0.7.tar.gz", "has_sig": false, "md5_digest": "0f78cb8c69b09b5289eb7e29f6507016", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10120, "upload_time": "2014-06-16T21:30:35", "url": "https://files.pythonhosted.org/packages/a3/18/941bc1605b01ac55dbaf76c0ca71a75842ac35c74e89d5c4c3c2fd76f4b5/salesforce-bulk-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "b1487ce68a31f62b25c5cfcaf8f2f020", "sha256": "996d08105825a320ae0d0a58e6244e9ed51a3c892b2c64804f44d69e3f3afeb6" }, "downloads": -1, "filename": "salesforce-bulk-1.0.8.tar.gz", "has_sig": false, "md5_digest": "b1487ce68a31f62b25c5cfcaf8f2f020", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10210, "upload_time": "2015-06-12T19:28:51", "url": "https://files.pythonhosted.org/packages/18/c6/23566b0a873bcf868f3f7b5a915f909a3ea3ff2b4db41c610a818c908967/salesforce-bulk-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "2e6f5c727a039f2116713509688b034b", "sha256": "54e1b6a542232d580f1e0f39cc3b2e35308f561a26676dc78dfc5c74c0b66dce" }, "downloads": -1, "filename": "salesforce-bulk-1.0.9.tar.gz", "has_sig": false, "md5_digest": "2e6f5c727a039f2116713509688b034b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10211, "upload_time": "2015-06-12T22:02:01", "url": "https://files.pythonhosted.org/packages/7f/ec/5cb0b86657d57a5105b69401ec69bbaee36f90c847c79f1adf380bac8690/salesforce-bulk-1.0.9.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "399980fde724e9fbca42b2b7904f1a52", "sha256": "1e0e4eb4f84dddc12170604c8fd05e44be248a85973ff23c0c33130018389259" }, "downloads": -1, "filename": "salesforce-bulk-1.1.0.tar.gz", "has_sig": false, "md5_digest": "399980fde724e9fbca42b2b7904f1a52", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11368, "upload_time": "2015-08-18T04:22:29", "url": "https://files.pythonhosted.org/packages/d0/92/f50ae0a2ec875dec752c964616cb1600babb2c16bc7147f0b5154ee0ea46/salesforce-bulk-1.1.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "7d66166b2a617a12650c5cfd49876a4a", "sha256": "021b0eb4d3192f80827888710a6b9b62c95908bb6f6c9f765c3795eec2cf0914" }, "downloads": -1, "filename": "salesforce_bulk-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7d66166b2a617a12650c5cfd49876a4a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11326, "upload_time": "2017-08-31T20:23:12", "url": "https://files.pythonhosted.org/packages/d0/07/328355931b02380c0ecf8eccfb34525bc3cbe5fdcad2b424fba6c545514e/salesforce_bulk-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6360afddbb045455d285b2eafc07ae40", "sha256": "4657282563cfd9bb8c1c572c7d503638826d25ffae0cd9736462c27fe57ebf8c" }, "downloads": -1, "filename": "salesforce-bulk-2.0.0.tar.gz", "has_sig": false, "md5_digest": "6360afddbb045455d285b2eafc07ae40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10272, "upload_time": "2017-08-31T20:23:13", "url": "https://files.pythonhosted.org/packages/3a/48/81d6fd3a87d0b8550f6b4715ed2972d3a9038f1b1066146313e9db335692/salesforce-bulk-2.0.0.tar.gz" } ], "2.0.0.dev6": [ { "comment_text": "", "digests": { "md5": "e5f43f1ea3b02b70f7dd76f4dc9b90cd", "sha256": "7f3dce5f48dfdecca0bc4184c062ccfb164046aba5f0924f5793369067830c78" }, "downloads": -1, "filename": "salesforce_bulk-2.0.0.dev6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e5f43f1ea3b02b70f7dd76f4dc9b90cd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12479, "upload_time": "2017-08-31T13:40:37", "url": "https://files.pythonhosted.org/packages/d5/47/5ab157214f8742cbb6f23431c1ddf3cb6fe95f3e54c796f16d011587e834/salesforce_bulk-2.0.0.dev6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9d56117815f082563b33710fcfa44af0", "sha256": "21c8b95dbf5693ce66655b19e517bd2be4da3a62bf325f65ddaec3a80848cdac" }, "downloads": -1, "filename": "salesforce-bulk-2.0.0.dev6.tar.gz", "has_sig": false, "md5_digest": "9d56117815f082563b33710fcfa44af0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9797, "upload_time": "2017-08-31T13:40:40", "url": "https://files.pythonhosted.org/packages/22/66/e8959bec27b458daa23158346a7423f92b63d42caa4251fb3a5d3355139e/salesforce-bulk-2.0.0.dev6.tar.gz" } ], "2.0.0.dev7": [ { "comment_text": "", "digests": { "md5": "be09878ed88fd96a7616ca5c470e350c", "sha256": "763cf1cd376a690761e353bab7b3a86f6daa21d044bf267eb4ccde6f03a806bf" }, "downloads": -1, "filename": "salesforce_bulk-2.0.0.dev7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "be09878ed88fd96a7616ca5c470e350c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11405, "upload_time": "2017-08-31T20:04:32", "url": "https://files.pythonhosted.org/packages/6a/47/c70d30c86a27989378fac013f4d917db14a72f6a75317a5ba2ae4e5a4e6f/salesforce_bulk-2.0.0.dev7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "980147cd32878b6e55121be465606460", "sha256": "a6e2d6c6330f3211c2d153533bc667cf9ddbee137eb3142930a4be167aa431f1" }, "downloads": -1, "filename": "salesforce-bulk-2.0.0.dev7.tar.gz", "has_sig": false, "md5_digest": "980147cd32878b6e55121be465606460", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10293, "upload_time": "2017-08-31T20:04:34", "url": "https://files.pythonhosted.org/packages/04/0b/c9a37d03ce5c3448578bf47a015d9cad20eacfd76b7156230a8dda06b12c/salesforce-bulk-2.0.0.dev7.tar.gz" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "43b64ae3034c7ea41f700861fd57f266", "sha256": "a25192eb508a45e1449118bede9f4095a310a2709d4788c26ffc3833201d96b0" }, "downloads": -1, "filename": "salesforce_bulk-2.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "43b64ae3034c7ea41f700861fd57f266", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12295, "upload_time": "2018-02-20T17:02:03", "url": "https://files.pythonhosted.org/packages/2b/9f/48f6049b4eed650e1bbf55fa29f39b58fdb22cd4aa01d5637775067dbc63/salesforce_bulk-2.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95c1709f3daddc249baac16d434dc31e", "sha256": "1c040927194ce732c44a4f6244ad5de39798d0c097c39033c88edeb77acb1caf" }, "downloads": -1, "filename": "salesforce-bulk-2.1.0.tar.gz", "has_sig": false, "md5_digest": "95c1709f3daddc249baac16d434dc31e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11209, "upload_time": "2018-02-20T17:02:05", "url": "https://files.pythonhosted.org/packages/87/66/c108f5af5db5575c5715d5ab665e1ce8f076c026ff1f7c10d7427da55e64/salesforce-bulk-2.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "43b64ae3034c7ea41f700861fd57f266", "sha256": "a25192eb508a45e1449118bede9f4095a310a2709d4788c26ffc3833201d96b0" }, "downloads": -1, "filename": "salesforce_bulk-2.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "43b64ae3034c7ea41f700861fd57f266", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12295, "upload_time": "2018-02-20T17:02:03", "url": "https://files.pythonhosted.org/packages/2b/9f/48f6049b4eed650e1bbf55fa29f39b58fdb22cd4aa01d5637775067dbc63/salesforce_bulk-2.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95c1709f3daddc249baac16d434dc31e", "sha256": "1c040927194ce732c44a4f6244ad5de39798d0c097c39033c88edeb77acb1caf" }, "downloads": -1, "filename": "salesforce-bulk-2.1.0.tar.gz", "has_sig": false, "md5_digest": "95c1709f3daddc249baac16d434dc31e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11209, "upload_time": "2018-02-20T17:02:05", "url": "https://files.pythonhosted.org/packages/87/66/c108f5af5db5575c5715d5ab665e1ce8f076c026ff1f7c10d7427da55e64/salesforce-bulk-2.1.0.tar.gz" } ] }