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, send-capable smx_mbx_* prefixes or owner-approved Sending-resource smx_agent_* tokens for Sending 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.2.0.tar.gz (5.6 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.2.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sendmux_core-1.2.0.tar.gz
  • Upload date:
  • Size: 5.6 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.2.0.tar.gz
Algorithm Hash digest
SHA256 fab8fdcb580b847672dfac5f3efff0354fa6a9f46a7d76f103d640bf888d2441
MD5 fbb27ce83945603d0041cb739cb397f8
BLAKE2b-256 3fb89721b74599aaa1428991d8a26f8913c6901a6941ed6e9d3f13120f048786

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: sendmux_core-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0e08a8dc0226fc8d86d358db45394fd46201157a9a939f741376c263bf7d1bc
MD5 0c416d28670b348d608b1b99bd5b85c7
BLAKE2b-256 d5e56eb22c40a60771976c9ccfe6301ff6fe1637625be43eb674df3f90edcb92

See more details on using hashes here.

Provenance

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