SDKsPython

Python SDK

The official Python client — generated models with a convenience wrapper, OAuth helpers, and a webhook signature verifier.

Getting it

The package is transmute-client. It is not yet on public PyPI — access is provided during onboarding (contact support); once published, it will be a plain pip install transmute-client.

Convert a message

from transmute import client_from_api_key
import os

client = client_from_api_key(
    "https://api.transmute.403fin.io",
    os.environ["TRANSMUTE_KEY"],
)

resp = client.convert(to="camt.053", message=mt940_text)  # from_ omitted → auto-detect

print(resp.meta.detected_type)  # "mt940"
for w in resp.warnings:
    print(f"{w.code} ({w.severity}): {w.detail}")

OAuth instead of an API key

from transmute import client_from_oauth

client = client_from_oauth(
    "https://api.transmute.403fin.io",
    client_id=os.environ["TRANSMUTE_CLIENT_ID"],
    client_secret=os.environ["TRANSMUTE_CLIENT_SECRET"],
)
# Mints and refreshes 15-minute tokens for you.

Verify a webhook delivery

from transmute import verify_webhook_signature, WebhookSignatureError

try:
    verify_webhook_signature(
        endpoint_secret,                        # "whsec_..." — the full string
        request.headers["X-Transmute-Signature"],
        raw_body,                               # raw bytes, before JSON parsing
        tolerance_seconds=300,
    )
except WebhookSignatureError:
    return 400

See Webhooks for the delivery contract.

Notes

  • Amounts are strings in every model — convert with decimal.Decimal, never float.
  • Errors raise typed exceptions (AuthError, ApiError) carrying the RFC 9457 problem, including the type slug from the error catalog.
  • The transmute_client package underneath is generated from the OpenAPI document; the transmute package is the hand-written ergonomic layer — import from transmute.