Digital Accountant: bank statement to checked books
Runs entirely on the accountant's own computer. No AI reads the bank data.
Last updated 21 October 2026
337 of 337 rows extracted and balance-verified on a real 14-page statement, 0 mismatches (the previous script had 66)300+ automated tests123 accounts imported from a real chart of accounts, no balances stored0 rows written when the same statement is re-imported
Problem
Accountants retype bank statements into Excel or QuickBooks by hand, and sending bank data to AI tools is a privacy risk.
Solution
Reads the statement PDF on the accountant's own computer, with no AI and no outside server touching the data. So far it has verified 337 of 337 rows on a real 14-page statement with zero mismatches, and it passes 300+ automated tests. A real chart of accounts of 123 accounts (no balances stored) has been imported, and re-importing the same statement writes nothing, so a statement can never be double-counted.
Stack
- Python 3.13
- uv
- pdfplumber
- pandas
- openpyxl
- SQLModel
- SQLite
- pytest
Engineering
- Exact decimal money, stored as integer paisa
- A validator checks opening + credits − debits = closing and the running balance on every row, returning PASS, FAIL or INCOMPLETE — designed so it never reports a false PASS
- Every dated row becomes a transaction or a recorded exception, so no row is dropped silently by design
- Account numbers are never stored in full: last 4 digits plus an HMAC fingerprint, with IBAN mod-97 validation
- Re-imports write nothing; overlapping statements and possible duplicates are flagged; every save is all-or-nothing with a count check
- Rule-based categorizer with 29 categories, including FBR and SRB tax payments, IBFT and Raast
- A per-client chart of accounts imported from a QuickBooks Account List, with the category-to-account mapping edited in Excel dropdowns
- Handles password-protected PDFs and right-aligned amount columns
- Privacy: the CLI prints only counts and reason codes, development uses synthetic PDFs, and the AI coding assistant is blocked from private data folders
Working on now
- Mapping categories to a real chart of accounts
- Designing the Excel output
Next
- Excel review workbook: ledger with account dropdowns, summary, exceptions, statement check and a client query list
- QuickBooks Desktop entry through Batch Enter Transactions
- Matching invoice and bill payments, including income tax and SRB sales tax withheld
- Wider testing: more months and other bank layouts