Emercury SMTP SDK for Python
The official Python client for sending transactional email and reading outbound delivery statistics through the stable Emercury SMTP API.
Installation
pip install emercury-smtp-sdk
Send an email
import os
import uuid
from emercury_smtp_sdk import (
ApiClient,
Configuration,
EmailAddress,
EmailApi,
EmailContentPart,
EmailContentType,
SendEmailRequest,
)
configuration = Configuration()
configuration.api_key["ApiTokenAuth"] = os.environ["EMERCURY_API_TOKEN"]
email = SendEmailRequest(
var_from=EmailAddress(email="sender@example.com", name="Example"),
to=EmailAddress(email="recipient@example.net"),
subject="Hello from Emercury",
contents=[EmailContentPart(
content_type=EmailContentType.TEXT_SLASH_PLAIN,
content="Your transactional email is ready.",
)],
)
with ApiClient(configuration) as api_client:
result = EmailApi(api_client).send_email(
email,
idempotency_key=str(uuid.uuid4()),
)
Use a unique idempotency key when a send may be retried. The same key and normalized payload return the original
response for 24 hours; reusing a key with a different payload returns 409 Conflict.
Metadata
Release files for emercury-smtp-sdk 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| emercury_smtp_sdk-1.0.1.tar.gz | 31.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| emercury_smtp_sdk-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 106.6 kB
Release files / emercury_smtp_sdk-1.0.1.tar.gz
| Download URL | emercury_smtp_sdk-1.0.1.tar.gz |
|---|---|
| Size | 31.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e03555464b4ca0ef74d8456862f6ca264ffa250c5f802353081caa1f629a8969
|
|
BLAKE2b-256 checksum How to use checksums |
f5253b5f4d964c2a0d2d75bec3c21e887a1181afae32925c90d8022d68e77d1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|
Release files / emercury_smtp_sdk-1.0.1-py3-none-any.whl
| Download URL | emercury_smtp_sdk-1.0.1-py3-none-any.whl |
|---|---|
| Size | 75.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f15a1deaaee64a6e62bac1e38a9ed05f7b6852d2df7dd882479fa0e754c5878d
|
|
BLAKE2b-256 checksum How to use checksums |
66579ad857ac04b35148131ca4cd8163757e71c656122be7ff70ef2b9d3f3795
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|