Skip to main content

PYRX Synapse Python SDK — async + sync client for event tracking, contacts, and email

Project description

pyrx-synapse

PyPI version License: MIT

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

MIT

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.2.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrx_synapse-0.1.2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file pyrx_synapse-0.1.2.tar.gz.

File metadata

  • Download URL: pyrx_synapse-0.1.2.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

Hashes for pyrx_synapse-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0829a0c25c981a7b0b4c3d85a70646553c60b31a52942cda72088be600d95b2f
MD5 4408cb7c1e5bb48e3abcd0e0ab54e82f
BLAKE2b-256 452165c75030348a387d1e106e935801efc58f00f01622152e7b9b8609ba053d

See more details on using hashes here.

File details

Details for the file pyrx_synapse-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyrx_synapse-0.1.2-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

Hashes for pyrx_synapse-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d7a48cf617be2ed40cdfc8f681693236e86e97b08ed9f24598b72f604cfe8ea
MD5 ce15a566ab6ee645a083f83511db09d3
BLAKE2b-256 55a71c66ad6b01aaeab191397ad963c57393409c4612849e9409aa5d41770b62

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page