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_* and smx_mbx_* key prefixes.
  • 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.1.tar.gz (4.5 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.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sendmux_core-1.1.1.tar.gz
  • Upload date:
  • Size: 4.5 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.1.tar.gz
Algorithm Hash digest
SHA256 6d8c46e0be024e361d1257e8a28055bce2f0a73ade744b8695a07355b1d2373c
MD5 04e9bbff836a86f854e48045b88c2a87
BLAKE2b-256 b940487c35d22fddbdffef9fba3ca55e4fa97951142ba71aa6409a724451adbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for sendmux_core-1.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: sendmux_core-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf885080a15ac8038bab3bc4656a791ff4832fa780f025c58610dff47287577a
MD5 5adaf2e21147c5da232d606a1b94c7ad
BLAKE2b-256 d5eabf747804109375308c4dc7773696db0e033ba00e36e94089e431498a0d97

See more details on using hashes here.

Provenance

The following attestation bundles were made for sendmux_core-1.1.1-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