A Salesforce API Adapter for Python
Project description
Salesforce Toolkit for Python
A modern, Pythonic interface to Salesforce APIs.
Features
- Clean, intuitive API design
- Both synchronous and asynchronous client support
- Simple SObject modeling using Python classes
- Powerful query builder for SOQL queries
- Efficient batch operations
- Automatic session management and token refresh
Installation
pip install sf-toolkit
Quick Start
from sf_toolkit import SalesforceClient, SObject, cli_login
from sf_toolkit.data.fields import IdField, TextField
# Define a Salesforce object model
class Account(SObject, api_name="Account"):
Id = IdField()
Name = TextField()
Industry = TextField()
Description = TextField()
# Connect to Salesforce using the CLI authentication
with SalesforceClient(login=cli_login()) as sf:
# Create a new account
account = Account(Name="Acme Corp", Industry="Technology")
account.save()
# Query accounts
query = SoqlSelect(Account)
results = query.query()
for acc in results.records:
print(f"{acc.Name} ({acc.Industry})")
Documentation
View the full documentation on github.io.
Building the documentation
You can build the documentation locally with:
# One-time build
python -m sphinx -b html docs/source docs/build/html
# Or with auto-reload during development
sphinx-autobuild docs/source docs/build/html
The documentation is automatically built from docstrings in the code, so make sure to write comprehensive docstrings for all public classes and methods.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sf_toolkit-0.1.2.tar.gz.
File metadata
- Download URL: sf_toolkit-0.1.2.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
152d72b1399b232bd331137cab6a34f5d7ef1d5607b8750d9c7d0be0220da96c
|
|
| MD5 |
f5bafcc4dac2ba3cf7399c66507f4f13
|
|
| BLAKE2b-256 |
8a53310fab93da3b3a20fbae3e7857e5fddc533791ff7ea70d595c3e474dddf0
|
Provenance
The following attestation bundles were made for sf_toolkit-0.1.2.tar.gz:
Publisher:
pypi-publish.yml on AndroxxTraxxon/python-sf-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sf_toolkit-0.1.2.tar.gz -
Subject digest:
152d72b1399b232bd331137cab6a34f5d7ef1d5607b8750d9c7d0be0220da96c - Sigstore transparency entry: 201547191
- Sigstore integration time:
-
Permalink:
AndroxxTraxxon/python-sf-toolkit@acdaafc42757336808e2040450525e576e3d2069 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/AndroxxTraxxon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@acdaafc42757336808e2040450525e576e3d2069 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sf_toolkit-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sf_toolkit-0.1.2-py3-none-any.whl
- Upload date:
- Size: 34.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9e53d5df9df5548e626225d0177ad7ef01c0e9d620afc13ec06fd26f04e6b31
|
|
| MD5 |
67637a6921a6d1dab963eee7e19d7e9a
|
|
| BLAKE2b-256 |
f33d0fffa7cb6648e6e50d083dbf57fac522da56278ae6f7d0ecd297875ef48c
|
Provenance
The following attestation bundles were made for sf_toolkit-0.1.2-py3-none-any.whl:
Publisher:
pypi-publish.yml on AndroxxTraxxon/python-sf-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sf_toolkit-0.1.2-py3-none-any.whl -
Subject digest:
e9e53d5df9df5548e626225d0177ad7ef01c0e9d620afc13ec06fd26f04e6b31 - Sigstore transparency entry: 201547192
- Sigstore integration time:
-
Permalink:
AndroxxTraxxon/python-sf-toolkit@acdaafc42757336808e2040450525e576e3d2069 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/AndroxxTraxxon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@acdaafc42757336808e2040450525e576e3d2069 -
Trigger Event:
release
-
Statement type: