Skip to main content

Shared runtime helpers for the Sendmux Python SDK packages.

Project description

sendmux-core

PyPI version Python versions PyPI downloads Licence

Shared runtime helpers for the Sendmux Python SDK packages.

Documentation

Requirements

  • Python 3.10 or newer.
  • A surface package such as sendmux-sending, sendmux-mailbox, or sendmux-management for API operations.

Installation

pip install sendmux-core

Usage

Validate an API key prefix and prepare request headers before calling a surface package.

import os

from sendmux_core import conditional_headers, idempotency_headers, validate_api_key

validate_api_key(os.environ["SENDMUX_MAILBOX_API_KEY"], surface="mailbox")

headers = {
    **idempotency_headers("idem_123"),
    **conditional_headers(if_none_match='W/"etag"'),
}

Helpers

  • validate_api_key checks smx_root_* prefixes for root clients and mailbox-compatible smx_mbx_* or smx_agent_* prefixes for mailbox clients.
  • configure_auth applies bearer auth to generated client configuration objects.
  • idempotency_headers and conditional_headers prepare request headers.
  • iter_cursor_pages iterates cursor-paginated list responses.
  • RetryOptions configures retry behaviour for generated clients.
  • SendmuxApiError normalises API errors and request IDs.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sendmux_core-1.1.3.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sendmux_core-1.1.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file sendmux_core-1.1.3.tar.gz.

File metadata

  • Download URL: sendmux_core-1.1.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for sendmux_core-1.1.3.tar.gz
Algorithm Hash digest
SHA256 9f06e9efbf92fee14c0ca9b43bcb0921c18b45b540635c55cfe3ad94485a9a34
MD5 32613eab5ab1c1643de40d15f7fe504a
BLAKE2b-256 ce08a76688c1c27baa4fbcef245ab0ab07607b072e437c6cf1cdb4e8eb3a897f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sendmux_core-1.1.3.tar.gz:

Publisher: release-please.yml on Sendmux/sendmux-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sendmux_core-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: sendmux_core-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for sendmux_core-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 35278bb4b43023ed12ab2f8073f922a884ae27923a40bd921c5105f826b82e64
MD5 3ec51f6112acdc019dff5f3b19812017
BLAKE2b-256 5b3b0fa332d0b7c3d607662ae9e68fb640ead9728ee8dbcfa70e89c88006a7ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for sendmux_core-1.1.3-py3-none-any.whl:

Publisher: release-please.yml on Sendmux/sendmux-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page