PYRX Synapse Python SDK — async + sync client for event tracking, contacts, and email
Project description
pyrx-synapse
Python SDK for the PYRX Synapse customer engagement platform. Provides both synchronous and asynchronous clients.
Requires Python 3.10+.
Installation
pip install pyrx-synapse
Quick Start
Sync
from pyrx_synapse import Synapse
with Synapse(api_key="gck_live_xxx", workspace_id="ws_xxx") as client:
# Track an event
client.track(external_id="user_123", event_name="purchase", attributes={"amount": 99.99})
# Identify a contact
client.identify(external_id="user_123", email="jane@example.com", properties={"tier": "pro"})
# Send a transactional email
client.send(
template_slug="welcome",
to={"user_id": "user_123", "email": "jane@example.com"},
attributes={"first_name": "Jane"},
)
Async
from pyrx_synapse import AsyncSynapse
async with AsyncSynapse(api_key="gck_live_xxx", workspace_id="ws_xxx") as client:
await client.track(external_id="user_123", event_name="purchase")
await client.identify(external_id="user_123", email="jane@example.com")
Features
- Synchronous and asynchronous clients
- Event tracking, contact management, template management, transactional email
- Webhook signature verification
- Automatic retry with exponential backoff
- Typed error classes for all API error types
Documentation
Full API reference and guides: synapse.pyrx.tech/developers/sdks/python
License
Project details
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 pyrx_synapse-0.1.3.tar.gz.
File metadata
- Download URL: pyrx_synapse-0.1.3.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc734f472aa77b22ddc456fd5a4f9d17c58454e912bb4a58e1521daf9fbf966e
|
|
| MD5 |
4f27145d2adf538ac4d3ce75bdf6cf08
|
|
| BLAKE2b-256 |
fed169cf5445a0808df93d8c815e7fa265205447ce2ad044f519b971065ebfec
|
File details
Details for the file pyrx_synapse-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pyrx_synapse-0.1.3-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
710295480c85ea8be70ca30a1b20146a18bce4d92240d1ea9628ebe62300f14f
|
|
| MD5 |
494fbea621ecb7851ba2f92663cb1385
|
|
| BLAKE2b-256 |
6b7ef9c1281d888bf334da2072df00bc85af587fda7ca8d6e6cd251b34313c65
|