MT940 for PythonΒΆ

Read bank statement text into transactions, decimal amounts, dates and balances. mt940 has no runtime dependencies and includes type information for Python 3.10 through 3.15.

Parse a first statement

Parse your first statement uses a complete fictional statement, then reads its transaction and closing balance. No bank file or checkout is needed.

Keep statement metadata

Keep separate statements and group transactions explains merged files, separate :20: blocks and transaction grouping within a statement.

Adapt a bank export

Customise tags and ordered processors builds isolated tag overrides and ordered processors. Choose compatibility options explains all ten opt-in switches.

Ship an integration

Export a statement to JSON follows a synthetic file through validation, reconciliation and a JSON report. Diagnose unexpected output diagnoses common surprises.

The parser preserves the values it recognises. It does not verify a bank's signature, calculate balances or guarantee that an export is complete. Your application decides which fields and reconciliation checks it requires.

Find a symbol through Index, browse Module Index, or use Search Page. Source and issue reports live on GitHub.