Skip to main content

mt2mx

Cliente oficial de Python para MT2MX — convierte mensajes SWIFT MT940/MT950 a ISO 20022 camt.053.

Instalación

pip install mt2mx

Uso

from mt2mx import MT2MXClient

client = MT2MXClient("sk_live_TU_API_KEY")

xml = client.convert(mt940_message)  # consume 1 crédito de tu paquete

result = client.validate(mt940_message)  # gratis, no consume créditos
# {"valid": True, "format": "MT940", "detail": None}

info = client.me()
# {"client_id": "...", "credits_remaining": 87, "credits_expire_at": "..."}

historial = client.logs(limit=10)

El cliente maneja automáticamente la obtención y renovación del token de acceso — solo necesitas tu API key.

Manejo de errores

from mt2mx import MT2MXClient, MT2MXCreditsError, MT2MXAuthError, MT2MXAPIError

client = MT2MXClient("sk_live_TU_API_KEY")

try:
    xml = client.convert(mt940_message)
except MT2MXCreditsError:
    print("Paquete de conversiones agotado o vencido")
except MT2MXAuthError:
    print("API key inválida")
except MT2MXAPIError as e:
    print(f"Error {e.status_code}: {e.detail}")

Documentación completa

https://mt2mx.cl/ayuda

Licencia

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mt2mx-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mt2mx-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file mt2mx-1.0.0.tar.gz.

File metadata

  • Download URL: mt2mx-1.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for mt2mx-1.0.0.tar.gz
Algorithm Hash digest
SHA256 eef6662ddbe7b49c11d19f97a6433fafe6ab8fb7234cd726083bde12b30634be
MD5 310f827821494847b2be6fbf1d45ad3a
BLAKE2b-256 e7f13c0fb2f1ce45dfc6e148a62a26faf353936b73c9dd55f59399d7f00d294d

See more details on using hashes here.

File details

Details for the file mt2mx-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mt2mx-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for mt2mx-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1075662788b4de8f2e7fbedbb1dd36c1e615b5b650ef5722abaa2cf965ed6ae
MD5 2ce95ab367dc766e338d4302a7882aa7
BLAKE2b-256 c632b2ca97f0d6620fb5e1fd4a201db4501c58e1403d54c0b53a3a81c78b4fb5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page