skillfed

salesforce-bulk

Python interface to the Salesforce.com Bulk API.

salesforce-bulk v2.2.0 3.2M downloads/30d#2,693 on PyPI214
Permissive license MIT Active released

What it is and what it does

Salesforce-bulk is a Python wrapper around Salesforce's asynchronous Bulk API, designed to handle large-scale data operations on Salesforce objects. It abstracts the job-batch workflow (create job, add batches, close, poll for completion) into a simple client interface, supporting query, queryAll, insert, update, and delete operations in both JSON and CSV formats.

The library handles authentication via password-based login or session ID, streams data efficiently through the post_batch method to avoid memory overhead on large datasets, and provides utilities like CsvDictsAdapter to convert Python dictionaries to CSV format. It also supports advanced features such as PK Chunking for querying large record sets and concurrency mode selection (Serial or Parallel).

Use it for:

  • Bulk export of Salesforce records (contacts, accounts, opportunities) to JSON or CSV for reporting or data warehousing.
  • Batch import of thousands of new records into Salesforce from external data sources without hitting API rate limits.
  • Periodic synchronization of Salesforce data with external systems using the asynchronous Bulk API.
  • Large-scale updates or deletions of Salesforce records where individual API calls would be too slow or costly.
  • Querying large Salesforce objects with PK Chunking enabled to parallelize retrieval and avoid timeout issues.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python client library for the Salesforce Bulk API, enabling asynchronous bulk operations (query, insert, update, delete) on Salesforce records.

Yes, with conditions. The package is actively maintained, permissively licensed, and widely downloaded (top 5000 on PyPI), making it a reliable choice for Salesforce bulk operations. However, the high install friction warrants investigation before deployment; verify dependency specifications and Python version support.

Install

salesforce-bulk on PyPI

pip

pip install salesforce-bulk

uv

uv add salesforce-bulk

poetry

poetry add salesforce-bulk

Installing salesforce-bulk

Before you install

High install friction reported; package has been actively maintained with a recent commit on 2026-07-27 and is marked Production/Stable, though no runtime dependencies are declared.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package with minimal restrictions, though you must include the license text.

Quickstart

pip install salesforce-bulk

from salesforce_bulk import SalesforceBulk

bulk = SalesforceBulk(username=username, password=password, security_token=security_token)
job = bulk.create_query_job("Contact", contentType='JSON')
batch = bulk.query(job, "select Id,LastName from Contact")
bulk.close_job(job)

Requires Salesforce credentials (username, password, security_token) or sessionId and instance URL.

Verify before relying

  • Whether simple-salesforce is a runtime dependency or only mentioned in documentation.
  • Current state of Python 3.9+ support (classifiers list only up to 3.8).
  • Whether the high install_friction reflects a known issue or a data artifact.

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance actively maintained — 2,101 days since the last release
Last repo commit
First released
Downloads 3,229,191/month — #2,693 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: salesforce-bulk-2.2.0.tar.gz

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

salesforce bulk api clientsalesforce async batch operationssalesforce bulk insert update deletesalesforce bulk querysalesforce data importsalesforce batch processing python
salesforce-integrationbulk-operationsdata-sync

More WWW/HTTP packages