An iso message bulk parser
Project description
Genat Iso Parser
An iso message bulk editor and parsor.
Usage:
ISO STREAMING
import the library
from genat_iso_parser.Iso import IsoDict, IsoFile, IsoStream
instantiate an instance of IsoStream
iso = IsoStream()
get current version
iso.iso_version
get supported versions
iso.supported_versions()
change any field value of your choice
iso.changed_fields = IsoDict({3: '001100'})
iso.changed_fields[2] = '9999999999999999999'
remove any number of fields of your choice
iso.removed_fields.add(7)
iso.removed_fields.update({3, 4})
add a field alomg with value
iso.added_fields.update({100: 'rywiujfbw8efhsdjkb'})
iso.added_fields[99] = 'isuhgghioadhfgioahdnf'
allow length of fields(if there is any) tobe printed to the output
iso.include_length = True
turn off fields length to be printed
iso.include_length = False
capture iso messages that come through stdin (default is 'json' the other one is 'iso') and output to stdout
iso.stream('iso')
stop streaming
iso.stop_stream()
ISO FILE
instantiate an instance of IsoFile, default version is 93
iso = IsoFile("your file here")
get current version
iso.iso_version
get supported versions
iso.supported_versions()
change any field value of your choice
iso.changed_fields = IsoDict({3: '001100'})
iso.changed_fields[2] = '1999999999999999999'
remove any number of fields of your choice
iso.removed_fields.add(5)
iso.removed_fields.update({3, 4})
add a field alomg with value
iso.added_fields = {100: 'rewayhfgiojsed'}
iso.added_fields[99] = 'isuhgghifgiosdjfoiaknoadhfgioahdnf'
allow length of fields(if there is any) tobe printed to the output
iso.include_length = True
turn off fields length to be printed
iso.include_length = False
produce csv file from the iso
csv_file = iso.to_csv()
produce iso file from the iso (might be useful for inspection of the iso)
iso_file = iso.to_iso()
produce json file from the iso
json_file = iso.to_json()
Iso format JSON file (ISO.json)
This part is only needed if there is a need to define your own ISO format file (Ex: defining your own ISO like ISO 20022)
This can be achieved using iso.custom_iso_version_file(file="your ISO format file", version="ISO version(Ex: 2)")
Additionally you can use the librariy's default ISO format as a sample by dowloading it using iso.download_iso_format_file()
Layout:
{
"A": {
"long": "B",
"short": "C",
"len": D,
"pad": E
},
.
.
.
}
- A -> field number
- B -> field long name
- C -> field short name
- D -> field length
- E -> length/size of leading field length for variable field lengths (Ex: field2 PAN has a pad of 2)
Sample:
{
"1": {
"long": "Secondary Bit Map",
"short": "BITMAP2",
"len": 16,
"pad": 0
},
"2": {
"long": "Primary Account Number",
"short": "PAN",
"len": 19,
"pad": 2
},
.
.
.
}
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genat_iso_parser-1.2.tar.gz.
File metadata
- Download URL: genat_iso_parser-1.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b338a16d924b88817300690511d34e83904bdd5d5573ad53850025e888f79b17
|
|
| MD5 |
ccc49bb4a30fd6c7b48ea9907e14ef66
|
|
| BLAKE2b-256 |
c1451d5435c7cac95c8c136b9e0b8cc42157a6c0c5686f6094784fdefb6db9f9
|
File details
Details for the file genat_iso_parser-1.2-py3-none-any.whl.
File metadata
- Download URL: genat_iso_parser-1.2-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
384644b66ee195387aef266b964c24c69bf573cdf16ae7623f70bb023fb2b7a0
|
|
| MD5 |
5fd4ba7d51d0f318b55d03bd92f8513b
|
|
| BLAKE2b-256 |
23c86c49668e11228654501e6d3c53c57c232f833f8cfd092f85608a5117e69a
|