Skip to main content

Parse MT103 messages from the Swift payments network

Project description

Parse MT103 messages from the Swift payments network

What’s an MT103?

Banks don’t really deal with cash much any more. Instead, they push bits around the internet tracking where your money goes digitally. The network that handles much of that movement is called Swift, and the transfers are documented in a special format native to that network called MT103.

What’s this Do?

Unfortunately, MT103 isn’t a common standard for most software developers. It’s ugly & hard to read for humans and not at all easy to parse. This library attempts to fix that, so all you have to do is pass an MT103 string into it and you get back a native Python object with the properties you’re looking for.

from mt103 import MT103

mt103 = MT103("some-mt-103-string")
print("basic header: {}, bank op code: {}, complete message: {}".format(
    mt103.basic_header,
    mt103.text.bank_operation_code,
    mt103
))

Installation

It’s on PyPi, so just install it with pip.

$ pip install mt103

TODO

Parsing MT103 messages should work just fine and you should be able to access all of the components via the Python API except for section 13C. From the specs I’ve seen, it’s unclear as to whether this section is permitted to repeat (meaning it should be parsed as a list) or if it’s one value only. If someone can explain this authoritatively to me, I can include support for this section as well.

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

mt103-1.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

mt103-1.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file mt103-1.1.0.tar.gz.

File metadata

  • Download URL: mt103-1.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for mt103-1.1.0.tar.gz
Algorithm Hash digest
SHA256 808212b675992555e0c8403fc51e5c316d832e1f96b885d6c3238dbfc18c3392
MD5 7d5fa62341d564fd81c86b2f8c2745a9
BLAKE2b-256 f82a993845aa1e33382761eb3d818fdf285e2bee67f54e750c485d8d9b89387f

See more details on using hashes here.

File details

Details for the file mt103-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: mt103-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for mt103-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3400313e785084f8e7f4a17a2e15b3a3f650c5c3d175ee3bd8ddd57b728caf30
MD5 9da5435c511281d6cceee534c1edc7ad
BLAKE2b-256 0b6ee189c3480cca0e0a2f083d5de2a0738f92863b947fa02c5ef30952f8a3dc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page