Skip to main content

Installation

1

Install 'suprsend-py-sdk' using pip

Python version 3.7 or later is requiredIf your python3 version is lower than 3.7, upgrade it.
Schema Validation Support: If you’re using schema validation for workflow payloads, you need Python SDK v0.15.0 or later. The API response format was modified to support schema validation, and older SDK versions may not properly handle validation errors.
2

Optional: Better attachment MIME type detection

When adding file attachments, the SDK needs to detect the file’s MIME type (for example application/pdf, image/png). By default, it uses Python’s built-in mimetypes module, which guesses based on the file extension.For more accurate detection based on actual file content, install the SDK with the magic extra:
This requires the libmagic system library:

Initialization

For initializing SDK, you need workspace_key and workspace_secret. You will get both the tokens from your Suprsend dashboard (Developers -> API Keys).