Developer friendly Python SDK for SendPulse Email REST API
Project description
SendPulse Python SDK
A lightweight, developer-friendly SDK for SendPulse Email REST API.
Install
pip install sendpulse-sdk
Quick Start
from sendpulse import SendPulseClient
client = SendPulseClient(
client_id="your_client_id",
client_secret="your_client_secret"
)
response = client.send_email(
to_email="recipient@example.com",
subject="Hello from SendPulse SDK",
body="<h1>Hello!</h1><p>Welcome to SendPulse transactional email integration.</p>",
from_email="sender@yourverifieddomain.com",
from_name="Your Company Name"
)
print(response)
Bulk Emails
You can send bulk emails in a single request. The SDK normalizes the inputs and executes sending requests sequentially, returning a summary of the results.
emails = [
{
"to_email": "user1@example.com",
"subject": "Hello User 1",
"body": "<h1>Welcome</h1><p>This is HTML content.</p>",
"type": "html"
},
{
"to": "user2@example.com",
"subject": "Hello User 2",
"body": "This is plain text content.",
"type": "text"
}
]
response = client.send_bulk_emails(
emails=emails,
from_email="sender@yourverifieddomain.com",
from_name="Your Company Name"
)
print(response)
Health Check
To test connection or verify that your Client ID and Client Secret are correct:
health_info = client.health()
print(health_info)
Core Parameters
client_id: OAuth Client ID (obtainable in your SendPulse account settings > API).client_secret: OAuth Client Secret (obtainable in your SendPulse account settings > API).api_url: Base URL for SendPulse REST API, defaults tohttps://api.sendpulse.com.timeout: Request timeout in seconds, defaults to30.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 sendpulse_sdk-1.0.0.tar.gz.
File metadata
- Download URL: sendpulse_sdk-1.0.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
658244f307605e6a9bc0f6a0d9fc310cc8f691af0a1c88f8d0ec3ab0d9966288
|
|
| MD5 |
b0ee5123175b17a3c6d354d35c21a61e
|
|
| BLAKE2b-256 |
5cd980c17a91291a113510be5b8008a45ca29b0a2c0224528f768037187490f5
|
File details
Details for the file sendpulse_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sendpulse_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3a80395389ff932ac7ce580642cbfc3c5116665fc9874abf7c23680605a0ff2
|
|
| MD5 |
0c020d168d38cb43f46445b6e7313de7
|
|
| BLAKE2b-256 |
7d866063c6ed05b1103b8559382d7c1f798154c5ab5d06eaa4a58009d561cc29
|