Registry / analytics / salesforce-cdp-connector

salesforce-cdp-connector

JSON →
library1.0.20pypypiunverified

The Salesforce CDP Connector is a Python library that enables SQL-based querying of Salesforce Data Cloud (formerly Customer Data Platform). It provides a friendly Pythonic interface to submit queries via the Data Cloud Query API and retrieve results as pandas DataFrames or GENERIC records. Current version 1.0.20 supports Python >=3.8 and requires authentication via a connected app (client ID, secret, and user token). It is maintained under the Salesforce open source ecosystem.

pip install salesforce-cdp-connector
INSTALL
IMPORT
SIG · SALESFORCE-CDP-CON
S
salesforce-cdp-connector
analyticspythonv1.0.20
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SalesforceCDP
from salesforcecdpconnector import SalesforceCDP
from salesforce_cdp_connector import SalesforceCDP

Minimal example querying Data Cloud. Credentials should be set via environment variables.

import os from salesforce_cdp_connector import SalesforceCDP connector = SalesforceCDP( client_id=os.environ.get('SF_CLIENT_ID', ''), client_secret=os.environ.get('SF_CLIENT_SECRET', ''), user_token=os.environ.get('SF_USER_TOKEN', ''), api_url=os.environ.get('SF_API_URL', 'https://api.salesforce.com') ) result = connector.query("SELECT Id, Name FROM Account LIMIT 10") print(result)
Debug
Known issues
breakingVersion 1.0.0 changed the authentication from username/password to OAuth2 client credentials. Existing code using username/password will break.
fix
Update to use client_id, client_secret, and user_token from a connected app. See migration guide.
affects: <1.0.0
gotchaThe SDK does not validate the API URL format; a missing trailing slash may cause unexpected HTTP errors.
fix
Always ensure api_url ends with '/services/data/vXX.X/' or use the default URL pattern.
affects: all
deprecatedThe method 'execute_query' is deprecated since 1.0.15; use 'query' instead.
fix
Replace connector.execute_query('...') with connector.query('...').
affects: >=1.0.15
Upgrade
Version history
1.0.20latest on PyPI · released Jun 2, 2026
Audit
Dependencies
pandasoptionalTo return query results as DataFrames
requestsrequiredHTTP client for API calls
Agent activity
28 hits · last 30 days
node
24
OpenAI (training)
1
Resources

No resource links recorded.

salesforce-cdp-connector — pip install salesforce-cdp-connector · libregistry