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="psk_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="psk_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
pyrx_synapse-0.1.5.tar.gz
(15.3 kB
view details)
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.5.tar.gz.
File metadata
- Download URL: pyrx_synapse-0.1.5.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 |
04e338242fc46759f6a43c7cba1c6a774f8895c214a069b509c850cccbafc7fe
|
|
| MD5 |
569a0481c402e3f34b678a24baf8c6cf
|
|
| BLAKE2b-256 |
a1c5e662f1411125781919ce204a2cb2da27d40c9abdc459af057b1a4ff5f4ff
|
File details
Details for the file pyrx_synapse-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pyrx_synapse-0.1.5-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 |
1f6302d7ecd733288a7900aefebbc16278574ef65d91a55e27062b17d1a91ae0
|
|
| MD5 |
471d03af84ba3457c6fe405b2f473a98
|
|
| BLAKE2b-256 |
9377d6f0138f5b81d687001dc957200d79a53d5521a5dfcf85ef7d2b03544286
|