Skip to main content

sendmux-sending

PyPI version Python versions PyPI downloads Licence

Generated Python client for the Sendmux Sending API.

Documentation

Requirements

  • Python 3.10 or newer.
  • A send-capable smx_mbx_* key or owner-approved Sending-resource smx_agent_* token.

Installation

pip install sendmux-sending

Connection checks

Check the authenticated team and credential without sending an email:

import os

from sendmux_sending import MetaApi, create_sending_client

with create_sending_client(api_key=os.environ["SENDMUX_SENDING_API_KEY"]) as client:
    connection = MetaApi(client).sending_get_connection()
    print(connection.data.label)

Usage

import os

from sendmux_sending import Address, EmailSendRequest, EmailsApi, create_sending_client

client = create_sending_client(api_key=os.environ["SENDMUX_SENDING_API_KEY"])
api = EmailsApi(client)

response = api.sending_send_email(
    EmailSendRequest(
        var_from=Address(email="sender@example.com"),
        to=Address(email="recipient@example.com"),
        subject="Hello from Sendmux",
        html_body="<p>Hello.</p>",
        text_body="Hello.",
    ),
    idempotency_key="email_123",
)

print(response.data.message_id)

The package exports every generated Sending model and API class plus:

  • create_sending_client
  • configure_sending
  • SendmuxSendingApiClient
  • file helpers: upload_attachment_from_file, send_email_with_files, and explicit legacy attachment_from_file

Attachments

For real files, upload bytes first and send with returned attachment_id refs. send_email_with_files does that automatically, so file bytes never enter model context or the JSON send body. Inline base64 remains available only when you intentionally call attachment_from_file for tiny generated content.

import os

from sendmux_sending import create_sending_client, send_email_with_files

client = create_sending_client(api_key=os.environ["SENDMUX_SENDING_API_KEY"])

send_email_with_files(
    client,
    files=["./report.pdf"],
    idempotency_key="report-123",
    body={
        "from": {"email": "sender@example.com"},
        "to": {"email": "recipient@example.com"},
        "subject": "Report",
        "html_body": "<p>Attached.</p>",
    },
)

To upload first and compose the send yourself:

import os

from sendmux_sending import EmailSendRequest, EmailsApi, create_sending_client, upload_attachment_from_file

client = create_sending_client(api_key=os.environ["SENDMUX_SENDING_API_KEY"])
attachment = upload_attachment_from_file(client, file_path="./report.pdf")

EmailsApi(client).sending_send_email(
    EmailSendRequest.from_dict({
        "from": {"email": "sender@example.com"},
        "to": {"email": "recipient@example.com"},
        "subject": "Report",
        "html_body": "<p>Attached.</p>",
        "attachments": [{"attachment_id": attachment.data.attachment_id}],
    })
)

Request helpers

Use sendmux-core when you need explicit idempotency, conditional request, pagination, retry, or typed-error helpers. The generated Sending client already uses the shared retry and error mapper.

Support

Open an issue in Sendmux/sendmux-sdk with the package name, version, and request ID from any API error.

Licence

MIT. See the licence file.

Metadata

Release files for sendmux-sending 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sendmux-sending 1.4.0
File Size Uploaded
sendmux_sending-1.4.0.tar.gz 34.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sendmux-sending 1.4.0
File Interpreter ABI Platform
sendmux_sending-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 113.6 kB

Release files / sendmux_sending-1.4.0.tar.gz

Download URL sendmux_sending-1.4.0.tar.gz
Size 34.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b82b4e865a45793c674a5727d5f2bea9dacf5a3e687b169d9674f51fd816ffca
BLAKE2b-256 checksum
How to use checksums
924a65fb39bc9389c109579537e014fbfeea84861f492cb07b84819288d587a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / sendmux_sending-1.4.0-py3-none-any.whl

Download URL sendmux_sending-1.4.0-py3-none-any.whl
Size 78.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93151462489b352c8953e51e11ca8ec972736ac1f47f3ed715536130abf62613
BLAKE2b-256 checksum
How to use checksums
a74d9b2c942b4abfaa21afcc3a068f2b44007a8b87a84aa2d1779e1139958e46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page