A Python Library for parsing ANSI ASC X12 files.
Install and update using pip:
pip install -U badX12
badX12 can be imported and used within your own project like so.
from badx12 import Parser
parser = Parser()
document = parser.parse_document("path-to-file/file.edi")
badX12 can also be used to parse an edi file into JSON or XML via the command line.
badx12 parse "path-to-edi-file"
badx12 parse "path-to-edi-file" -e XML -o "path-to-output-dir"
By default the parse command will output a JSON file to the current user's Documents\badX12 directory. The -e flag can be used to specify the export format, and the -o flag can be used to specify the output directory.
- Parse x12 file format into a python object
- Parse x12 file format into JSON and XML
- License: https://en.wikipedia.org/wiki/MIT_License
- Documentation: https://badX12.readthedocs.io.
- X12 EDI Standard: http://www.x12.org/x12-work-products/x12-edi-standards.cfm