Official Python SDK for the ThreadSync API.
Preview: SDKs are in preview and installed from GitHub. Registry packages (npm, PyPI, etc.) will be available at GA.
pip install git+https://github.com/threadsync-infrastructure/threadsync-python.gitfrom threadsync import ThreadSync
client = ThreadSync(bearer_token='YOUR_API_KEY')
# Create a connection
connection = client.connections.create(
'salesforce',
credentials={'username': 'user@example.com', 'password': 'secret'}
)
# Set up a sync
sync = client.sync.create(
source={'connection': connection.id, 'object': 'Contact'},
destination={'connection': 'dest-conn-id', 'table': 'contacts'},
schedule='realtime',
)
print(f'Sync started: {sync.id}')| Parameter | Type | Required | Description |
|---|---|---|---|
bearer_token |
str |
Yes | Your ThreadSync API key |
base_url |
str |
No | Override the API base URL (default: https://api.threadsync.io/v1) |
| Method | Description |
|---|---|
connections.create(provider, **kwargs) |
Create a new connection |
connections.get(id) |
Retrieve a connection by ID |
connections.list() |
List all connections |
| Method | Description |
|---|---|
sync.create(source, destination, schedule) |
Create a new sync job |
sync.get(id) |
Retrieve a sync by ID |
MIT — see LICENSE