Python SDK for the SendKit email API
Project description
SendKit Python SDK
Official Python SDK for the SendKit email API.
Installation
pip install sendkit
Usage
Create a Client
from sendkit import SendKit
client = SendKit("sk_your_api_key")
Send an Email
result = client.emails.send(
from_="you@example.com",
to="recipient@example.com",
subject="Hello from SendKit",
html="<h1>Welcome!</h1>",
)
print(result["id"])
Send a MIME Email
result = client.emails.send_mime(
envelope_from="you@example.com",
envelope_to="recipient@example.com",
raw_message=mime_string,
)
Error Handling
API errors raise SendKitError:
from sendkit import SendKit, SendKitError
client = SendKit("sk_your_api_key")
try:
client.emails.send(...)
except SendKitError as e:
print(e.name) # e.g. "validation_error"
print(e.message) # e.g. "The to field is required."
print(e.status_code) # e.g. 422
Configuration
# Read API key from SENDKIT_API_KEY environment variable
client = SendKit()
# Custom base URL
client = SendKit("sk_...", base_url="https://custom.api.com")
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 sendkit-1.0.6.tar.gz.
File metadata
- Download URL: sendkit-1.0.6.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3befaf3c0e08c3df9719d48daa1740817c412f5603375f4d65140346b41aed0
|
|
| MD5 |
a54ef4cc64734cb013fbd0df9cdc87ad
|
|
| BLAKE2b-256 |
cc8d6bf6f6ef95cf92dc4155f253e8630de23d16dd477e81b4070932fb607bc4
|
Provenance
The following attestation bundles were made for sendkit-1.0.6.tar.gz:
Publisher:
tests.yml on sendkitdev/sendkit-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sendkit-1.0.6.tar.gz -
Subject digest:
c3befaf3c0e08c3df9719d48daa1740817c412f5603375f4d65140346b41aed0 - Sigstore transparency entry: 1099355192
- Sigstore integration time:
-
Permalink:
sendkitdev/sendkit-python@65b05475a8b28ae2914883ee59c726c9559a50b5 -
Branch / Tag:
refs/tags/1.0.6 - Owner: https://github.com/sendkitdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tests.yml@65b05475a8b28ae2914883ee59c726c9559a50b5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sendkit-1.0.6-py3-none-any.whl.
File metadata
- Download URL: sendkit-1.0.6-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d76a9e6ba095e861789328b4a517e5299bb77be847bae4dd08fd7c75ff5bc433
|
|
| MD5 |
b362975ffca3eda7eb121542957dffe8
|
|
| BLAKE2b-256 |
63dd350499d91b762e11c3a3ced424cfaaa11e79e0c143ea1c242902cfd4053b
|
Provenance
The following attestation bundles were made for sendkit-1.0.6-py3-none-any.whl:
Publisher:
tests.yml on sendkitdev/sendkit-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sendkit-1.0.6-py3-none-any.whl -
Subject digest:
d76a9e6ba095e861789328b4a517e5299bb77be847bae4dd08fd7c75ff5bc433 - Sigstore transparency entry: 1099355229
- Sigstore integration time:
-
Permalink:
sendkitdev/sendkit-python@65b05475a8b28ae2914883ee59c726c9559a50b5 -
Branch / Tag:
refs/tags/1.0.6 - Owner: https://github.com/sendkitdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tests.yml@65b05475a8b28ae2914883ee59c726c9559a50b5 -
Trigger Event:
push
-
Statement type: