Project / Python
Arispec
A dependency-free, declarative parser for irregular print reports and mainframe spool — anchored on meaning rather than brittle column numbers.
Arispec extracts structured data from the fixed-width reports that banks, insurers, telecoms, and public agencies still produce — including the ones whose headings and values have drifted apart over decades of separate edits.
- 0runtime dependencies
- 121tests across report fixtures and a 24-source discovery corpus
- Dataspecifications can be stored, diffed, generated, and reviewed
Ask the way a person reads the report
A money value may end in column 78 on one row and 79 on the next because a trailing minus sign was appended after right-justification. Pinning either column can silently turn a negative into a positive. Arispec instead lets a specification ask for the last money-shaped token on the row.
section detail starts(/^GL\s+Tran #/):
rows:
field gl: columns 0-24
field amount: last money
Type declarations do more than convert a slice after extraction: they help delimit the value itself. Labels, types, sections, repeated regions, and across-or-down relationships describe the document without embedding a parser in application code.
Refusal is part of the result
A malformed amount becomes UNKNOWN for that cell with a diagnostic;
it never becomes a silent zero and never sinks a hundred-thousand-line import.
An ambiguous date stays ambiguous until the spec declares its convention.
The parser reports what it could not honestly know instead of manufacturing
a plausible value.
Install
pip install arispec
Every Python example in the README and documentation is executed by the test suite and compared with the text printed beneath it.
Downloads & installation
Builds are coming soon. Grab the source from GitHub for now.