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.
Release files for mt103 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mt103-1.1.1.tar.gz | 16.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mt103-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.8 kB
Release files / mt103-1.1.1.tar.gz
| Download URL | mt103-1.1.1.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6571d9ce460bdd06cc1310f252683faf0e91a5ccb434cfd9fe943da8679de2ca
|
|
BLAKE2b-256 checksum How to use checksums |
ae260f11e895d71dcc94740141d0102ae098473c6bcf20f6354ad07a44fb93af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.6 Linux/5.9.3-arch1-1
|
Release files / mt103-1.1.1-py3-none-any.whl
| Download URL | mt103-1.1.1-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5386ec0c982c9115f5442f802ed80253054d5041a4930417929619b2dcd7f5a6
|
|
BLAKE2b-256 checksum How to use checksums |
2d078c44117a779012db63018a998e08fb6644d6c9d9506d594b5d9c5891a580
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.6 Linux/5.9.3-arch1-1
|