pyx12.x12file¶
- Interface to an X12 data stream.
Efficiently handles large files.
Tracks end of explicit loops.
Tracks segment/line/loop counts.
Tracks some transaction specific counters: 837 2400/LX 837 HL tree
Attributes¶
Classes¶
Module Contents¶
- class pyx12.x12file.X12Base[source]¶
Base class of X12 Reader and X12 Writer Common X12 validation
Initialize the X12 file
- class pyx12.x12file.X12Reader(src_file_obj)[source]¶
Bases:
X12BaseRead an X12 data file
Errors found when reading the segment such as loop counting or ID errors can be retrieved using the pop_errors function
Initialize the file X12 file reader
- Parameters:
src_file_obj (string or open file object) – absolute path of source file or an open, readable file object
- class pyx12.x12file.X12Writer(src_file_obj, seg_term='~', ele_term='*', subele_term='\\', eol='\n', repetition_term='^')[source]¶
Bases:
X12BaseX12 file and stream writer
Initialize the file X12 file writer
- Parameters: