BAI2 is a Python library for parsing BAI2 files, a standard format for bank statement reporting. Version 0.15.0 supports Python >=3.6 and provides a simple parser to extract account transactions, balances, and metadata. The project is maintained by the Ministry of Justice (UK). Release cadence is low; last update was 2023.
pip install bai2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parse a BAI2 file string and access account and transaction data.
Use open('file.bai2', 'r').read() to pass the content.Always wrap parsing in try/except and check for None fields.
Use Python 3.7 or later if you encounter RuntimeError related to 'from __future__ import annotations'.
No dependency data recorded yet.