Berikut langkah-langkah sederhana untuk melakukan parsing pesan ISO 8583 menggunakan Python.
Instalasi modul ISO8583.


$ pip install https://pypi.python.org/packages/source/I/ISO8583%20Module/ISO8583%20Module-1.2.zip

test_parse_8583.py

# test_parse_8583.py
from ISO8583.ISO8583 import ISO8583


if name == ‘main‘:
iso = ‘0800d010800000000000000000002000000001200000000000400001200170299’

msg = ISO8583()
msg.setIsoContent(iso)

print ‘Tipe pesan: %s’ % msg.getMTI()
# iterasi field / kolom
for field in msg.getBitsAndValues():
print ‘Kolom %s [%s] : %s’ % (field[‘bit’],
field[‘type’], field[‘value’])


Output

Tipe pesan: 0800
Kolom 2 [LL] : 012
Kolom 4 [N] : 000000000004
Kolom 12 [N] : 000012
Kolom 17 [N] : 0017
Kolom 99 [LL] : 0299