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.2.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.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sendmux_core-1.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 2ba7be4f5472392b6c0a35e1960be6bb43e84f7eb82c7c3cac35cd9fe0f2492f
MD5 8eb8868da29325629d218b8dbb12146f
BLAKE2b-256 e6ffca507631f863b22d10ca743d7e6e1464cf370e120012e134d543c652d9c7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: sendmux_core-1.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a2d97c4f9f1a1600ce94231adee8254fbe0cbb1f2f0e9f8f5c1ce6266be1384
MD5 5a1620bc23b262a479c1c26e5f205769
BLAKE2b-256 4ce33d862a3022a07fd41fba1c98761410bbbdcb961e4f83aeaa26c4869fad91

See more details on using hashes here.

Provenance

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