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="syk_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="syk_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.4.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.4-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrx_synapse-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 2b76717fb971306826e2dbaa0009d0ea6fb81f4aa07baa8ce263fc325875965c
MD5 ecf012fc75f6a2f455ca70f2fe2575f5
BLAKE2b-256 fbaf23e6073c0beca0e639a7c32733f8c7b02101f1dd7aacd8075511d2382d9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrx_synapse-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 79d6c2e48c4d6bb3e1a30b0b5c7005eef89fc5a3a5a0058c5bc827861aabe2ee
MD5 87ed964f68a94b41d37f723ad418103c
BLAKE2b-256 7e22a6dec68a56c866031efbbf9fe7b22ee9a01e24af8292ef750bd09ef89558

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