Parser String to JSON for ISO8583 Package
Project description
ISO8583 Dlib Parser
Parser String to JSON for ISO8583 Package
This package has been developed with a cookiecutter made for me in: https://github.com/ActivandoIdeas/Python-Package-Cookiecutter
Docs
Full docs ISO: https://github.com/eocode/ISO8583-Dlib/blob/master/8583.pdf
About ISO Links:
- https://es.wikipedia.org/wiki/ISO_8583
- https://www.chileoffshore.com/es/interesting-articles/115-todo-sobre-iso8583
- http://j8583.sourceforge.net/es/iso8583.html
Resume Docs and Parser Example
How to Install
With pip
pip install ISO8583-Dlib
Basic Usage
The entry is a message
from iso8583_dlib.parser import Parser
if __name__ == "__main__":
message = "ISO0260000700200B23E842128A1801A00000000100000BC0010000000000070020707203500000013153459070724050707070705161199999999999274231453201761925=2405226096000000000619P0891218 INBURSA CASHBACK CD MEXICO 001MX0277126834 00010101484016B036PRO1+0000000019B359 00000000000370& 0000700370! C000026 113000 ! C400012 000000021082! Q200002 03! B200158 7FF900008000800080008251FFC4F2FDE21D0000000070020000000000003C00002A48448420070700BE967302000706010A03A4B80200000"
data = Parser(message)
# Set true to generate a data.json file with parser message
print(data.get_json(save=True))
The output is a json
{
"literal": "ISO",
"header": {
"Complete_header": "026000070",
"Product_indicator": {
"value": "02",
"description": "POS"
},
"Release_number": {
"value": "60",
"description": "DEFAULT"
},
"Status": {
"value": "000",
"description": "Undetermined"
},
"Originator_code": {
"value": "7",
"description": "Interchange"
},
"Responder_code": {
"value": "0",
"description": "Undetermined"
}
},
"mti": {
"value": "0200",
"description": "Financial transaction request"
},
"primary_bitmap": "B23E842128A1801A",
"...": "..."
}
Full output message: https://github.com/eocode/ISO8583-Dlib/blob/master/data.json
Test this project
pip install pytest
pytest
Think use
Easy library for use, create an specific API with your favorite framework and integrate with other systems
To Do
- Validate in real use
- Valid output
- Complement json rules to process all Data Elements
- Add logic for variable Data Elements
- Add other output formats
- Add other input formats
- Make validations with a library as https://pydantic-docs.helpmanual.io/usage/validators or a simple implementation
How to contribute
Read CONTRIBUTTING.md file and make an issue and send a PR to improve
Other implementations
Changelog of ISO8583 Dlib
0.1.0 (2020-09-25)
- First version of ISO8583 Parser
First release of ISO8583 Dlib.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ISO8583-Dlib-0.1.8.tar.gz
.
File metadata
- Download URL: ISO8583-Dlib-0.1.8.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89ce35cbb6a94d15669a9862658e72dab65c5910119a0572e019d4eb31baa42e |
|
MD5 | aeba16c60339062607bac3e4deb32718 |
|
BLAKE2b-256 | 9bb5b4d2c9b29c784969ca768276f3b1d0a0972f83f6bf63704cf56fed176ed3 |
File details
Details for the file ISO8583_Dlib-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: ISO8583_Dlib-0.1.8-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9e437057ad9da997a0a64f60d60fa444319c0a3ef89ae3fabdeb2c20c6e9780 |
|
MD5 | ee3a3144737bf1eab2508ffc2e06f101 |
|
BLAKE2b-256 | 2171f252efeb500c17d00a7f22258aa6624345666c6e86289f214952230e60c3 |