usend for Python
The official Python SDK for usend, the email API for developers.
pip install usend
import os
from usend import Usend
usend = Usend(os.environ["USEND_API_KEY"])
email = usend.emails.send({
"from": "Acme <hello@acme.com>",
"to": "ann@example.com",
"subject": "Your login code",
"html": "<p>Your code is <b>482913</b></p>",
})
print(email["id"])
Methods return the API's JSON as dicts and raise usend.UsendError (status_code, name, message).
- Python 3.9 or newer. No dependencies.
- The key defaults to
USEND_API_KEY; the base URL toUSEND_BASE_URLorhttps://api.usend.et. - Resources:
emails,batch,received,templates,domains,api_keys,segments,contacts,broadcasts,webhooks,suppressions.
Verify a webhook (pass the raw body):
from usend import verify_webhook
event = verify_webhook(raw_body, request.headers, os.environ["USEND_WEBHOOK_SECRET"])
Docs: https://usend.et/docs
Metadata
Release files for usend 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| usend-1.0.0.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| usend-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / usend-1.0.0.tar.gz
| Download URL | usend-1.0.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01c2348ca3e82e0722ea970acdeabd8f474eb68705a3faabc14e5986b2b897d9
|
|
BLAKE2b-256 checksum How to use checksums |
791104add3e696cbb14300919d02a809ecee3c190e2d02d186242346b4b9a00f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / usend-1.0.0-py3-none-any.whl
| Download URL | usend-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a232a0998de03fd6c5d829244d3d2886d6c6ce902fc171b5ec32049cdf2c7d06
|
|
BLAKE2b-256 checksum How to use checksums |
b80698fbc7377a1208d2f1f8c8d2b0300f6753b70849618c43f1e44c4f7c71e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|