SDKsPython

Python SDK

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

Getting it

pip install transmute-client

The distribution is transmute-client; you import transmute. Its version tracks the API release: transmute-client==X.Y.Z is generated from API release vX.Y.Z and published through PyPI trusted publishing with attestations.

First publish pending. Until the first release appears on PyPI, access is provided during onboarding (contact support).

Convert a message

import os
from transmute import client_from_api_key, convert

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

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

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

convert, normalize, validate, and enrich are one-call helpers that take the client first and raise ApiError on a problem response. Every other route (batch jobs and their item stream, diff, verify, anonymize, samples, history, overrides, webhooks, connections) is available as a generated module under transmute_client.api, called with the same client.

Pin the API version

New in this release: every client constructor takes api_version, which sends X-Api-Version on every request and pins date-versioned behaviour (today, the default Standards Release). Leave it out to follow your API key's pin, else the current version. See Migrating from SR2025 to SR2026.

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

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 one 15-minute token. The client does not refresh it: call
# client_from_oauth again (or mint_oauth_token) when it expires.

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.