Skip to main content

Official Python SDK for the Sandesh notification API.

Project description

sandesh-sdk

Official Python SDK for the Sandesh notification API.

License

This SDK is licensed under the MIT License.

See ../LICENSE.

Install

pip install sandesh-sdk

Quick start

from sandesh.sdk import Sandesh

client = Sandesh(
    base_url="https://your-sandesh-api.example.com",
    bearer_token="your_jwt_or_api_key",
)

result = client.events_trigger(
    {
        "name": "vendor-assessment-form-to-vendor",
        "to": {"subscriberId": "vendor-contact-1"},
        "payload": {
            "organisation": "Acme Corp",
            "vendor_name": "Globex",
            "assessment_name": "Vendor Risk Check",
            "due_date": "April 30, 2026",
            "url": "https://app.example.com/assessment?id=123",
        },
        "overrides": {
            "email": {
                "cc": ["risk@example.com"],
                "subject": "Reminder: Vendor Risk Check",
            }
        },
    }
)

print(result)

Covered methods

  • Events: strict and legacy trigger methods.
  • Subscribers: create/get/list/update/deactivate.
  • Notifications: create/list/get/seen/unseen/retry/resend.
  • Templates: list/create/get/update/delete/preview/validate.
  • Integrations and credentials.
  • Settings, SES helpers, stats, and health.

If your code currently uses Novu-style classes, switch imports only:

from sandesh.api import EventApi, SubscriberApi
from sandesh.dto import SubscriberDto

Publish to PyPI

  1. Build distribution files:
python -m pip install --upgrade build twine
python -m build
  1. Validate package metadata:
python -m twine check dist/*
  1. Upload to TestPyPI (recommended first):
python -m twine upload --repository testpypi dist/*
  1. Upload to PyPI:
python -m twine upload dist/*

Set credentials using environment variables before uploading:

  • TWINE_USERNAME=__token__
  • TWINE_PASSWORD=<your_pypi_api_token>

Build compiled wheel (Cython)

To ship a binary wheel with Cython-compiled SDK modules, build with SANDESH_BUILD_COMPILED=1.

Windows PowerShell:

$env:SANDESH_BUILD_COMPILED="1"
python -m pip install --upgrade build cython
python -m build --wheel

Standard source + wheel build (default, no Cython compilation):

Remove-Item Env:SANDESH_BUILD_COMPILED -ErrorAction Ignore
python -m build

Notes:

  • Compiled wheels require a local C/C++ toolchain (for example, Microsoft C++ Build Tools on Windows).
  • This raises reverse-engineering difficulty but cannot provide absolute code secrecy in Python packaging.

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

sandesh_sdk-0.3.2.tar.gz (321.4 kB view details)

Uploaded Source

Built Distributions

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

sandesh_sdk-0.3.2-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

sandesh_sdk-0.3.2-cp312-cp312-win_amd64.whl (142.1 kB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file sandesh_sdk-0.3.2.tar.gz.

File metadata

  • Download URL: sandesh_sdk-0.3.2.tar.gz
  • Upload date:
  • Size: 321.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for sandesh_sdk-0.3.2.tar.gz
Algorithm Hash digest
SHA256 9f7c1bac2f7903a3600559fe9d51b3de1f6021748abe8fda920ef91c2481d955
MD5 20be8bedaba0c2b4fc83585406ab2c86
BLAKE2b-256 b13d2f4c12059c35364aa8b3095165a77a76b3bf3f5d92afc5e08a50cc9a2d7c

See more details on using hashes here.

File details

Details for the file sandesh_sdk-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: sandesh_sdk-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for sandesh_sdk-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f57fc6a1b3a93957ed5ee37145e54e3d62fd27e9cc1ce488b46fdbd6d7f93a82
MD5 2a6d05e48b0fc6176fe72a650056940b
BLAKE2b-256 524c88886e8baeaa34384a6b3ab1a713a1eb8b024f5d6ed1ed6528acedb70f44

See more details on using hashes here.

File details

Details for the file sandesh_sdk-0.3.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for sandesh_sdk-0.3.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 91e9cd3242bcd1a3cee1566c0ca7753994502a54429e3ebdc059d78d3371604f
MD5 0df2b3e1bbdcb7ba3a0f133d940a7e09
BLAKE2b-256 1ed0d3adb9e58f3b1e2327b1d610ef02698312138ea9af8b8001ac4cb21260e4

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