ZhengLinLei / iso8583p

Python ISO8583 Parser with own Specs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iso8583p.py

Apache 2.0

PIP package install:

pip install iso8583p

Follow the steps in Pypi to run the project like a python module Pypi https://pypi.org/project/iso8583p/

How to run it?

1. Install modules

Install all the modules in setup.py file path

py setup.py install 

Linux user

python3 setup.py install

or with PIP

pip install iso8583p

2. Import to project

Import the module in your python file, and run it

import iso8583p
from iso8583p import Iso8583, MemDump, Str2Bcd, IsoSpec1987BCD

IsoPacket = Iso8583(IsoSpec = IsoSpec1987BCD())

# Create an example ISO message
# 1200 Message, type Sale

IsoPacket.MTI("1200")
# Field 2
IsoPacket.Field(2, 1)
IsoPacket.FieldData(2, 8888806368324521)
# Field 3
IsoPacket.Field(3, 1)
IsoPacket.FieldData(3, 000000)

IsoPacket.PrintMessage()
data = IsoPacket.BuildIso()
data = struct.pack(b"!!", len(data)) + data         
MemDump("Sending:", data)

Linux user run the command in your terminal with python3 and pip3

Love this repo? Give us a star ⭐

About

Python ISO8583 Parser with own Specs

License:Apache License 2.0


Languages

Language:Python 100.0%