bankstatementparser 0.0.18__tar.gz → 0.0.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/PKG-INFO +78 -47
  2. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/README.md +73 -46
  3. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/__init__.py +67 -2
  4. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/_llm_common.py +6 -1
  5. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/additional_parsers.py +269 -275
  6. bankstatementparser-0.0.20/bankstatementparser/analytics.py +691 -0
  7. bankstatementparser-0.0.20/bankstatementparser/api.py +583 -0
  8. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/bank_statement_parsers.py +40 -22
  9. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/base_parser.py +77 -7
  10. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/camt_parser.py +546 -249
  11. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/cli.py +58 -49
  12. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/enrichment/categorizer.py +47 -23
  13. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/export/__init__.py +3 -0
  14. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/export/ledger.py +33 -5
  15. bankstatementparser-0.0.20/bankstatementparser/export/parquet.py +161 -0
  16. bankstatementparser-0.0.20/bankstatementparser/field86_parser.py +186 -0
  17. bankstatementparser-0.0.20/bankstatementparser/forensics.py +337 -0
  18. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/hybrid/llm_extractor.py +8 -6
  19. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/hybrid/orchestrator.py +26 -6
  20. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/hybrid/scanner.py +10 -6
  21. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/hybrid/vision.py +174 -70
  22. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/input_validator.py +13 -5
  23. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/pain001_parser.py +281 -192
  24. bankstatementparser-0.0.20/bankstatementparser/parallel.py +162 -0
  25. bankstatementparser-0.0.20/bankstatementparser/plugins.py +165 -0
  26. bankstatementparser-0.0.20/bankstatementparser/privacy.py +73 -0
  27. bankstatementparser-0.0.20/bankstatementparser/py.typed +0 -0
  28. bankstatementparser-0.0.20/bankstatementparser/reconciliation.py +362 -0
  29. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/record_types.py +12 -1
  30. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/transaction_deduplicator.py +66 -41
  31. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/transaction_models.py +35 -16
  32. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/zip_security.py +110 -2
  33. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/pyproject.toml +9 -5
  34. bankstatementparser-0.0.18/bankstatementparser/api.py +0 -326
  35. bankstatementparser-0.0.18/bankstatementparser/parallel.py +0 -121
  36. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/LICENSE +0 -0
  37. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/LICENSE-APACHE +0 -0
  38. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/LICENSE-MIT +0 -0
  39. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/_amounts.py +0 -0
  40. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/enrichment/__init__.py +0 -0
  41. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/enrichment/account_mapper.py +0 -0
  42. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/exceptions.py +0 -0
  43. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/hybrid/__init__.py +0 -0
  44. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/hybrid/evaluation.py +0 -0
  45. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/hybrid/ollama_direct.py +0 -0
  46. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/hybrid/pdf_text.py +0 -0
  47. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/hybrid/prompts.py +0 -0
  48. {bankstatementparser-0.0.18 → bankstatementparser-0.0.20}/bankstatementparser/hybrid/verification.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bankstatementparser
3
- Version: 0.0.18
3
+ Version: 0.0.20
4
4
  Summary: BankStatementParser is your essential tool for easy bank statement management. Designed with finance and treasury experts in mind, it offers a simple way to handle CAMT (ISO 20022) formats and more. Get quick, accurate insights from your financial data and spend less time on processing. It's the smart, hassle-free way to stay on top of your transactions.
5
5
  License: Apache-2.0 OR MIT
6
6
  License-File: LICENSE
@@ -16,12 +16,14 @@ Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
18
  Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: 3.15
19
20
  Provides-Extra: api
20
21
  Provides-Extra: enrichment
21
22
  Provides-Extra: excel
22
23
  Provides-Extra: hybrid
23
24
  Provides-Extra: hybrid-plus
24
25
  Provides-Extra: hybrid-vision
26
+ Provides-Extra: parquet
25
27
  Provides-Extra: polars
26
28
  Requires-Dist: defusedxml (>=0.7.1,<0.8.0)
27
29
  Requires-Dist: fastapi (>=0.115.0) ; extra == "api"
@@ -31,15 +33,26 @@ Requires-Dist: openpyxl (>=3.1.5,<4.0.0) ; extra == "excel"
31
33
  Requires-Dist: pandas (>=2.3.3,<3.0.0)
32
34
  Requires-Dist: pdfplumber (>=0.11.0) ; extra == "hybrid-plus"
33
35
  Requires-Dist: polars (>=1.32.0,<2.0.0) ; extra == "polars"
36
+ Requires-Dist: pyarrow (>=14.0.0) ; extra == "parquet"
34
37
  Requires-Dist: pydantic (>=2.11.0,<3.0.0)
35
38
  Requires-Dist: pypdf (>=4.0.0) ; extra == "hybrid" or extra == "hybrid-plus" or extra == "hybrid-vision"
36
39
  Requires-Dist: pypdfium2 (>=4.30.0) ; extra == "hybrid-vision"
40
+ Requires-Dist: python-multipart (>=0.0.32) ; extra == "api"
37
41
  Requires-Dist: uvicorn (>=0.34.0) ; extra == "api"
38
42
  Project-URL: Homepage, https://bankstatementparser.com
39
43
  Project-URL: Repository, https://github.com/sebastienrousseau/bankstatementparser
40
44
  Description-Content-Type: text/markdown
41
45
 
42
- <!-- SPDX-License-Identifier: Apache-2.0 OR MIT>
46
+ <!-- SPDX-License-Identifier: Apache-2.0 OR MIT -->
47
+
48
+ <p align="center">
49
+ <img
50
+ src="https://cloudcdn.pro/bankstatementparser/v1/logos/bankstatementparser.svg"
51
+ alt="bankstatementparser logo"
52
+ width="120"
53
+ height="120"
54
+ />
55
+ </p>
43
56
 
44
57
  <h1 align="center">Bank Statement Parser</h1>
45
58
 
@@ -51,7 +64,7 @@ Description-Content-Type: text/markdown
51
64
 
52
65
  <p align="center">
53
66
  <a href="https://github.com/sebastienrousseau/bankstatementparser/actions"><img src="https://img.shields.io/github/actions/workflow/status/sebastienrousseau/bankstatementparser/quality-gates.yml?style=for-the-badge&logo=github" alt="Build" /></a>
54
- <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/pyversions/bankstatementparser.svg?style=for-the-badge&v=0.0.18" alt="PyPI" /></a>
67
+ <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/pyversions/bankstatementparser.svg?style=for-the-badge&v=0.0.20" alt="PyPI" /></a>
55
68
  <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/dm/bankstatementparser.svg?style=for-the-badge" alt="PyPI Downloads" /></a>
56
69
  <a href="https://codecov.io/github/sebastienrousseau/bankstatementparser?branch=main"><img src="https://img.shields.io/codecov/c/github/sebastienrousseau/bankstatementparser?style=for-the-badge" alt="Codecov" /></a>
57
70
  <a href="LICENSE"><img src="https://img.shields.io/github/license/sebastienrousseau/bankstatementparser?style=for-the-badge" alt="License" /></a>
@@ -228,26 +241,28 @@ from bankstatementparser.hybrid import smart_ingest
228
241
 
229
242
  # Path A — deterministic parser (free, fastest, $0)
230
243
  result = smart_ingest("statement.xml")
231
- print(result.source_method) # "deterministic"
244
+ print(result.source_method) # "deterministic"
232
245
 
233
246
  # Path B — text-LLM for digital PDFs (set BSP_HYBRID_MODEL=ollama/llama3)
234
247
  result = smart_ingest("statement.pdf")
235
- print(result.source_method) # "llm"
236
- print(result.verification.status) # VERIFIED | DISCREPANCY | UNVERIFIABLE | FAILED
248
+ print(result.source_method) # "llm"
249
+ print(
250
+ result.verification.status
251
+ ) # VERIFIED | DISCREPANCY | UNVERIFIABLE | FAILED
237
252
 
238
253
  # Path C — multimodal vision for scanned PDFs (set BSP_HYBRID_VISION_MODEL)
239
254
  # auto-routed when pypdf cannot extract enough text
240
255
  result = smart_ingest("scan.pdf")
241
- print(result.source_method) # "vision"
256
+ print(result.source_method) # "vision"
242
257
  ```
243
258
 
244
259
  Every row carries:
245
260
 
246
261
  - `source_method` — `"deterministic"`, `"llm"`, or `"vision"` for
247
262
  full audit provenance
248
- - `transaction_hash` — MD5 fingerprint of
249
- `date | normalized_description | amount`, ready for idempotent
250
- re-ingestion
263
+ - `transaction_hash` — versioned SHA-256 fingerprint scoped to account,
264
+ currency, date, description, amount, and available bank identity.
265
+ Rebuild persisted pre-v2 keys before re-ingestion
251
266
  - `confidence` — float between 0 and 1 for LLM rows, `None` for
252
267
  deterministic
253
268
  - `raw_source_text` — best-effort source-text slice for the v0.0.6
@@ -276,7 +291,9 @@ For ZIP archives, use `iter_secure_xml_entries()`.
276
291
  from bankstatementparser import CamtParser, iter_secure_xml_entries
277
292
 
278
293
  for entry in iter_secure_xml_entries("statements.zip"):
279
- parser = CamtParser.from_bytes(entry.xml_bytes, source_name=entry.source_name)
294
+ parser = CamtParser.from_bytes(
295
+ entry.xml_bytes, source_name=entry.source_name
296
+ )
280
297
  transactions = parser.parse()
281
298
  print(entry.source_name, len(transactions), "transactions")
282
299
  ```
@@ -298,23 +315,23 @@ Gemini, …).
298
315
 
299
316
  ```mermaid
300
317
  flowchart TD
301
- A[smart_ingest&lpar;path&rpar;] --> B{detect_statement_format}
302
- B -- CAMT/PAIN/OFX/MT940/CSV --> C[Path A: deterministic parser<br/>$0, fastest]
303
- C --> Z[IngestResult<br/>source_method='deterministic']
318
+ A["smart_ingest(path)"] --> B{"detect_statement_format"}
319
+ B -->|CAMT/PAIN/OFX/MT940/CSV| C["Path A: deterministic parser<br/>$0, fastest"]
320
+ C --> Z["IngestResult<br/>source_method='deterministic'"]
304
321
 
305
- B -- pdf or unknown --> D[pypdf extract_text]
306
- D --> E{text len &gt;= 50?}
322
+ B -->|pdf or unknown| D["pypdf extract_text"]
323
+ D --> E{"text length >= 50?"}
307
324
 
308
- E -- yes --> F[Path B: text-LLM<br/>default ollama/llama3]
309
- F --> Y[IngestResult<br/>source_method='llm']
325
+ E -->|yes| F["Path B: text-LLM<br/>default ollama/llama3"]
326
+ F --> Y["IngestResult<br/>source_method='llm'"]
310
327
 
311
- E -- no --> G[Path C: vision-LLM<br/>opt-in via BSP_HYBRID_VISION_MODEL]
312
- G --> X[IngestResult<br/>source_method='vision']
328
+ E -->|no| G["Path C: vision-LLM<br/>opt-in via BSP_HYBRID_VISION_MODEL"]
329
+ G --> X["IngestResult<br/>source_method='vision'"]
313
330
 
314
- Z --> V[verify_balance<br/>Golden Rule]
331
+ Z --> V["verify_balance<br/>Golden Rule"]
315
332
  Y --> V
316
333
  X --> V
317
- V --> R[VERIFIED / DISCREPANCY / UNVERIFIABLE / FAILED]
334
+ V --> R["VERIFIED / DISCREPANCY / UNVERIFIABLE / FAILED"]
318
335
  ```
319
336
 
320
337
  Every extracted row carries an immutable `transaction_hash`, an
@@ -354,7 +371,7 @@ for the full surface.
354
371
  |---|---|
355
372
  | **Golden Rule verification** *(v0.0.5)* | Every result carries `opening + credits − debits == closing` status: `VERIFIED`, `DISCREPANCY`, `UNVERIFIABLE`, or `FAILED`. |
356
373
  | **Multi-currency verification** *(v0.0.8)* | `verify_balance_multi_currency()` groups transactions by currency and runs the Golden Rule independently per group — no more false `DISCREPANCY` on multi-currency statements. |
357
- | **Idempotent dedup** *(v0.0.5)* | Every `Transaction` carries a stable `transaction_hash` (MD5 of date + normalized description + amount). `Deduplicator.dedupe_by_hash()` makes incremental ingestion safe to re-run. |
374
+ | **Idempotent dedup** *(v0.0.5)* | Every `Transaction` carries a stable `transaction_hash` (versioned SHA-256 of account, currency, date, description, amount, and bank identity). `Deduplicator.dedupe_by_hash()` makes incremental ingestion safe to re-run. |
358
375
  | **Interactive review** *(v0.0.6)* | `--type review` CLI walks through discrepancies with accept/edit/skip/delete/quit. `IngestResult.to_json()` / `.from_json()` for stable round-trip with embedded audit trail. |
359
376
 
360
377
  ### Enrichment & export
@@ -373,17 +390,18 @@ for the full surface.
373
390
  |---|---|
374
391
  | **PII redaction** | Names, IBANs, and addresses masked by default — opt in with `--show-pii` |
375
392
  | **Secure ZIP** | `iter_secure_xml_entries()` rejects zip bombs, encrypted entries, and suspicious compression ratios |
376
- | **Tested** | 869 tests, coverage gated at 100% in CI, property-based fuzzing with Hypothesis |
393
+ | **Tested** | 1007 tests, coverage gated at 100% in CI, property-based fuzzing with Hypothesis |
377
394
 
378
395
  ---
379
396
 
380
397
  ## PII Redaction
381
398
 
382
399
  PII (names, IBANs, addresses) is **redacted by default** in
383
- console output and streaming mode.
400
+ CLI console output. Python parser methods return full records unless
401
+ `redact_pii=True` is supplied.
384
402
 
385
403
  ```python
386
- # Redacted by default
404
+ # Request redaction explicitly in Python
387
405
  for tx in parser.parse_streaming(redact_pii=True):
388
406
  print(tx) # Names and addresses show as ***REDACTED***
389
407
 
@@ -392,8 +410,9 @@ for tx in parser.parse_streaming(redact_pii=False):
392
410
  print(tx)
393
411
  ```
394
412
 
395
- File exports (CSV, JSON, Excel) always contain the full unredacted
396
- data.
413
+ Regular and hybrid file exports contain full records. Legacy CLI streaming
414
+ exports follow `--show-pii`; Python exports reflect the records supplied.
415
+ Choose redaction explicitly before sharing an exported file.
397
416
 
398
417
  ---
399
418
 
@@ -440,11 +459,13 @@ Process multiple files simultaneously across CPU cores:
440
459
  ```python
441
460
  from bankstatementparser import parse_files_parallel
442
461
 
443
- results = parse_files_parallel([
444
- "statements/jan.xml",
445
- "statements/feb.xml",
446
- "statements/mar.xml",
447
- ])
462
+ results = parse_files_parallel(
463
+ [
464
+ "statements/jan.xml",
465
+ "statements/feb.xml",
466
+ "statements/mar.xml",
467
+ ]
468
+ )
448
469
 
449
470
  for r in results:
450
471
  print(r.path, r.status, len(r.transactions), "rows")
@@ -693,13 +714,22 @@ versioned companion packages build on it — each is its own repository
693
714
  and Python package, so you install only what you need and the core
694
715
  stays dependency-light.
695
716
 
696
- | Package | PyPI | Role | What it adds |
697
- |---|---|---|---|
698
- | [`bankstatementparser-mcp`](https://github.com/sebastienrousseau/bankstatementparser-mcp) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-mcp.svg)](https://pypi.org/project/bankstatementparser-mcp/) | AI agents | [Model Context Protocol](https://modelcontextprotocol.io) server — exposes detect / parse / validate / summarize as tools for Claude Desktop and other LLM clients |
699
- | [`bankstatementparser-lsp`](https://github.com/sebastienrousseau/bankstatementparser-lsp) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-lsp.svg)](https://pypi.org/project/bankstatementparser-lsp/) | Editors | Language Server with live MT940 diagnostics (missing tags, malformed balance / `:61:` lines) over [pygls](https://github.com/openlawlibrary/pygls) |
700
- | [`bankstatementparser-writer-xlsx`](https://github.com/sebastienrousseau/bankstatementparser-writer-xlsx) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-writer-xlsx.svg)](https://pypi.org/project/bankstatementparser-writer-xlsx/) | Output | Write parsed transactions (DataFrame, `Transaction` list, or dicts) to a polished Excel `.xlsx` workbook |
701
- | [`bankstatementparser-loader-mt942`](https://github.com/sebastienrousseau/bankstatementparser-loader-mt942) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-mt942.svg)](https://pypi.org/project/bankstatementparser-loader-mt942/) | Input | Parse SWIFT **MT942** interim transaction reports into `Transaction` objects (a format the core does not read) |
702
- | [`bankstatementparser-loader-bai2`](https://github.com/sebastienrousseau/bankstatementparser-loader-bai2) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-bai2.svg)](https://pypi.org/project/bankstatementparser-loader-bai2/) | Input | Parse **BAI2** cash-management files into `Transaction` objects (a format the core does not read) |
717
+ | Package | GitHub Repository | PyPI | Role | Description |
718
+ |---|---|---|---|---|
719
+ | [`bankstatementparser`](https://github.com/sebastienrousseau/bankstatementparser) | [`sebastienrousseau/bankstatementparser`](https://github.com/sebastienrousseau/bankstatementparser) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser.svg)](https://pypi.org/project/bankstatementparser/) | Core Engine | Unified parser for CAMT (052/053), PAIN.001, CSV, OFX, QFX, MT940, and PDF statements |
720
+ | [`bankstatementparser-mcp`](https://github.com/sebastienrousseau/bankstatementparser-mcp) | [`sebastienrousseau/bankstatementparser-mcp`](https://github.com/sebastienrousseau/bankstatementparser-mcp) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-mcp.svg)](https://pypi.org/project/bankstatementparser-mcp/) | AI Protocol | Model Context Protocol (MCP) server exposing statement tools to LLMs & AI agents |
721
+ | [`bankstatementparser-lsp`](https://github.com/sebastienrousseau/bankstatementparser-lsp) | [`sebastienrousseau/bankstatementparser-lsp`](https://github.com/sebastienrousseau/bankstatementparser-lsp) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-lsp.svg)](https://pypi.org/project/bankstatementparser-lsp/) | Developer Tooling | Language Server Protocol (LSP) with live SWIFT MT940 statement validation & diagnostics |
722
+ | [`bankstatementparser-transport-ebics`](https://github.com/sebastienrousseau/bankstatementparser-transport-ebics) | [`sebastienrousseau/bankstatementparser-transport-ebics`](https://github.com/sebastienrousseau/bankstatementparser-transport-ebics) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-transport-ebics.svg)](https://pypi.org/project/bankstatementparser-transport-ebics/) | Transport | Automated bank statement retrieval over EBICS 3.0 (`H005`) and 2.5 (`H004`) protocols |
723
+ | [`bankstatementparser-writer-xlsx`](https://github.com/sebastienrousseau/bankstatementparser-writer-xlsx) | [`sebastienrousseau/bankstatementparser-writer-xlsx`](https://github.com/sebastienrousseau/bankstatementparser-writer-xlsx) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-writer-xlsx.svg)](https://pypi.org/project/bankstatementparser-writer-xlsx/) | Output Writer | Formats and exports parsed banking transactions into styled Microsoft Excel (`.xlsx`) workbooks |
724
+ | [`bankstatementparser-writer-qif`](https://github.com/sebastienrousseau/bankstatementparser-writer-qif) | [`sebastienrousseau/bankstatementparser-writer-qif`](https://github.com/sebastienrousseau/bankstatementparser-writer-qif) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-writer-qif.svg)](https://pypi.org/project/bankstatementparser-writer-qif/) | Output Writer | Serializes transactions into standard Quicken Interchange Format (`.qif`) exchange files |
725
+ | [`bankstatementparser-writer-ofx`](https://github.com/sebastienrousseau/bankstatementparser-writer-ofx) | [`sebastienrousseau/bankstatementparser-writer-ofx`](https://github.com/sebastienrousseau/bankstatementparser-writer-ofx) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-writer-ofx.svg)](https://pypi.org/project/bankstatementparser-writer-ofx/) | Output Writer | Serializes transactions into standard Open Financial Exchange (`.ofx`) XML/SGML files |
726
+ | [`bankstatementparser-writer-swift`](https://github.com/sebastienrousseau/bankstatementparser-writer-swift) | [`sebastienrousseau/bankstatementparser-writer-swift`](https://github.com/sebastienrousseau/bankstatementparser-writer-swift) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-writer-swift.svg)](https://pypi.org/project/bankstatementparser-writer-swift/) | Output Writer | Exports transactions to SWIFT MT940 customer statements and MT942 interim reports |
727
+ | [`bankstatementparser-loader-bai2`](https://github.com/sebastienrousseau/bankstatementparser-loader-bai2) | [`sebastienrousseau/bankstatementparser-loader-bai2`](https://github.com/sebastienrousseau/bankstatementparser-loader-bai2) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-bai2.svg)](https://pypi.org/project/bankstatementparser-loader-bai2/) | Input Loader | Parses BAI2 cash-management and account balance statements |
728
+ | [`bankstatementparser-loader-mt942`](https://github.com/sebastienrousseau/bankstatementparser-loader-mt942) | [`sebastienrousseau/bankstatementparser-loader-mt942`](https://github.com/sebastienrousseau/bankstatementparser-loader-mt942) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-mt942.svg)](https://pypi.org/project/bankstatementparser-loader-mt942/) | Input Loader | Parses SWIFT MT942 interim transaction reports with credit/debit summary reconciliation |
729
+ | [`bankstatementparser-loader-cfonb`](https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb) | [`sebastienrousseau/bankstatementparser-loader-cfonb`](https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-cfonb.svg)](https://pypi.org/project/bankstatementparser-loader-cfonb/) | Input Loader | Parses French CFONB 120 / AFB120 120-byte fixed-width banking statement files |
730
+ | [`bankstatementparser-loader-camt054`](https://github.com/sebastienrousseau/bankstatementparser-loader-camt054) | [`sebastienrousseau/bankstatementparser-loader-camt054`](https://github.com/sebastienrousseau/bankstatementparser-loader-camt054) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-camt054.svg)](https://pypi.org/project/bankstatementparser-loader-camt054/) | Input Loader | Ingests ISO 20022 CAMT.054 real-time debit/credit notification stream XML |
731
+ | [`bankstatementparser-loader-sepa`](https://github.com/sebastienrousseau/bankstatementparser-loader-sepa) | [`sebastienrousseau/bankstatementparser-loader-sepa`](https://github.com/sebastienrousseau/bankstatementparser-loader-sepa) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-sepa.svg)](https://pypi.org/project/bankstatementparser-loader-sepa/) | Input Loader | Ingests ISO 20022 SEPA PAIN.002 payment status reports and PAIN.008 direct debit mandates |
732
+ | [`bankstatementparser-loader-bacs`](https://github.com/sebastienrousseau/bankstatementparser-loader-bacs) | [`sebastienrousseau/bankstatementparser-loader-bacs`](https://github.com/sebastienrousseau/bankstatementparser-loader-bacs) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-bacs.svg)](https://pypi.org/project/bankstatementparser-loader-bacs/) | Input Loader | Parses UK BACS Standard 18 / Faster Payments 106-byte fixed-width transmission files |
703
733
 
704
734
  Loaders turn an additional source format into the same unified
705
735
  `Transaction` model; writers take parsed data back out to another
@@ -707,8 +737,8 @@ target. Each companion pins `bankstatementparser` as a dependency and
707
737
  ships its own 100%-coverage test suite.
708
738
 
709
739
  ```bash
710
- # Mix and match: e.g. read an MT942 file, then export to Excel
711
- pip install bankstatementparser-loader-mt942 bankstatementparser-writer-xlsx
740
+ # Mix and match: e.g. fetch via EBICS 3.0, parse CAMT.053, and export to SWIFT MT940 or Excel
741
+ pip install bankstatementparser-transport-ebics bankstatementparser-writer-swift bankstatementparser-writer-xlsx
712
742
  ```
713
743
 
714
744
  Loaders hand back the same `Transaction` model the core parsers
@@ -720,15 +750,15 @@ cleanly — see each companion's README for runnable examples.
720
750
  ## Project Layout
721
751
 
722
752
  ```text
723
- bankstatementparser/ Source code (32 modules)
753
+ bankstatementparser/ Source code (39 modules)
724
754
  bankstatementparser/hybrid/ PDF pipeline: orchestrator, llm_extractor, vision, scanner, ollama_direct, verification
725
755
  bankstatementparser/enrichment/ Categorizer, AccountMapper, EnrichedTransaction
726
- bankstatementparser/export/ hledger + beancount journal export
756
+ bankstatementparser/export/ hledger + beancount journal export, Apache Parquet columnar export
727
757
  bankstatementparser/api.py REST API microservice (FastAPI)
728
758
  docs/compliance/ ISO 13485 validation, risk register, traceability matrix
729
759
  examples/ 14 deterministic + 9 hybrid runnable example scripts
730
760
  scripts/ SBOM generation, checksums, signature verification
731
- tests/ 869 tests (unit, integration, property-based, security, hybrid mocks)
761
+ tests/ 1007 tests (unit, integration, property-based, security, hybrid mocks)
732
762
  ```
733
763
 
734
764
  ---
@@ -800,8 +830,9 @@ No. Zero network calls. XML parsers enforce `no_network=True`. No
800
830
  cloud, no telemetry.
801
831
 
802
832
  **Is PII redacted automatically?**
803
- Yes. Names, IBANs, and addresses are masked by default in console
804
- output and streaming. File exports retain full data.
833
+ CLI console output masks personal fields by default. Python callers
834
+ must request `redact_pii=True`. Regular file exports retain full data;
835
+ legacy streaming exports follow `--show-pii`.
805
836
 
806
837
  **Is the extraction deterministic?**
807
838
  Yes. Same input produces byte-identical output. Critical for
@@ -1,4 +1,13 @@
1
- <!-- SPDX-License-Identifier: Apache-2.0 OR MIT>
1
+ <!-- SPDX-License-Identifier: Apache-2.0 OR MIT -->
2
+
3
+ <p align="center">
4
+ <img
5
+ src="https://cloudcdn.pro/bankstatementparser/v1/logos/bankstatementparser.svg"
6
+ alt="bankstatementparser logo"
7
+ width="120"
8
+ height="120"
9
+ />
10
+ </p>
2
11
 
3
12
  <h1 align="center">Bank Statement Parser</h1>
4
13
 
@@ -10,7 +19,7 @@
10
19
 
11
20
  <p align="center">
12
21
  <a href="https://github.com/sebastienrousseau/bankstatementparser/actions"><img src="https://img.shields.io/github/actions/workflow/status/sebastienrousseau/bankstatementparser/quality-gates.yml?style=for-the-badge&logo=github" alt="Build" /></a>
13
- <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/pyversions/bankstatementparser.svg?style=for-the-badge&v=0.0.18" alt="PyPI" /></a>
22
+ <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/pyversions/bankstatementparser.svg?style=for-the-badge&v=0.0.20" alt="PyPI" /></a>
14
23
  <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/dm/bankstatementparser.svg?style=for-the-badge" alt="PyPI Downloads" /></a>
15
24
  <a href="https://codecov.io/github/sebastienrousseau/bankstatementparser?branch=main"><img src="https://img.shields.io/codecov/c/github/sebastienrousseau/bankstatementparser?style=for-the-badge" alt="Codecov" /></a>
16
25
  <a href="LICENSE"><img src="https://img.shields.io/github/license/sebastienrousseau/bankstatementparser?style=for-the-badge" alt="License" /></a>
@@ -187,26 +196,28 @@ from bankstatementparser.hybrid import smart_ingest
187
196
 
188
197
  # Path A — deterministic parser (free, fastest, $0)
189
198
  result = smart_ingest("statement.xml")
190
- print(result.source_method) # "deterministic"
199
+ print(result.source_method) # "deterministic"
191
200
 
192
201
  # Path B — text-LLM for digital PDFs (set BSP_HYBRID_MODEL=ollama/llama3)
193
202
  result = smart_ingest("statement.pdf")
194
- print(result.source_method) # "llm"
195
- print(result.verification.status) # VERIFIED | DISCREPANCY | UNVERIFIABLE | FAILED
203
+ print(result.source_method) # "llm"
204
+ print(
205
+ result.verification.status
206
+ ) # VERIFIED | DISCREPANCY | UNVERIFIABLE | FAILED
196
207
 
197
208
  # Path C — multimodal vision for scanned PDFs (set BSP_HYBRID_VISION_MODEL)
198
209
  # auto-routed when pypdf cannot extract enough text
199
210
  result = smart_ingest("scan.pdf")
200
- print(result.source_method) # "vision"
211
+ print(result.source_method) # "vision"
201
212
  ```
202
213
 
203
214
  Every row carries:
204
215
 
205
216
  - `source_method` — `"deterministic"`, `"llm"`, or `"vision"` for
206
217
  full audit provenance
207
- - `transaction_hash` — MD5 fingerprint of
208
- `date | normalized_description | amount`, ready for idempotent
209
- re-ingestion
218
+ - `transaction_hash` — versioned SHA-256 fingerprint scoped to account,
219
+ currency, date, description, amount, and available bank identity.
220
+ Rebuild persisted pre-v2 keys before re-ingestion
210
221
  - `confidence` — float between 0 and 1 for LLM rows, `None` for
211
222
  deterministic
212
223
  - `raw_source_text` — best-effort source-text slice for the v0.0.6
@@ -235,7 +246,9 @@ For ZIP archives, use `iter_secure_xml_entries()`.
235
246
  from bankstatementparser import CamtParser, iter_secure_xml_entries
236
247
 
237
248
  for entry in iter_secure_xml_entries("statements.zip"):
238
- parser = CamtParser.from_bytes(entry.xml_bytes, source_name=entry.source_name)
249
+ parser = CamtParser.from_bytes(
250
+ entry.xml_bytes, source_name=entry.source_name
251
+ )
239
252
  transactions = parser.parse()
240
253
  print(entry.source_name, len(transactions), "transactions")
241
254
  ```
@@ -257,23 +270,23 @@ Gemini, …).
257
270
 
258
271
  ```mermaid
259
272
  flowchart TD
260
- A[smart_ingest&lpar;path&rpar;] --> B{detect_statement_format}
261
- B -- CAMT/PAIN/OFX/MT940/CSV --> C[Path A: deterministic parser<br/>$0, fastest]
262
- C --> Z[IngestResult<br/>source_method='deterministic']
273
+ A["smart_ingest(path)"] --> B{"detect_statement_format"}
274
+ B -->|CAMT/PAIN/OFX/MT940/CSV| C["Path A: deterministic parser<br/>$0, fastest"]
275
+ C --> Z["IngestResult<br/>source_method='deterministic'"]
263
276
 
264
- B -- pdf or unknown --> D[pypdf extract_text]
265
- D --> E{text len &gt;= 50?}
277
+ B -->|pdf or unknown| D["pypdf extract_text"]
278
+ D --> E{"text length >= 50?"}
266
279
 
267
- E -- yes --> F[Path B: text-LLM<br/>default ollama/llama3]
268
- F --> Y[IngestResult<br/>source_method='llm']
280
+ E -->|yes| F["Path B: text-LLM<br/>default ollama/llama3"]
281
+ F --> Y["IngestResult<br/>source_method='llm'"]
269
282
 
270
- E -- no --> G[Path C: vision-LLM<br/>opt-in via BSP_HYBRID_VISION_MODEL]
271
- G --> X[IngestResult<br/>source_method='vision']
283
+ E -->|no| G["Path C: vision-LLM<br/>opt-in via BSP_HYBRID_VISION_MODEL"]
284
+ G --> X["IngestResult<br/>source_method='vision'"]
272
285
 
273
- Z --> V[verify_balance<br/>Golden Rule]
286
+ Z --> V["verify_balance<br/>Golden Rule"]
274
287
  Y --> V
275
288
  X --> V
276
- V --> R[VERIFIED / DISCREPANCY / UNVERIFIABLE / FAILED]
289
+ V --> R["VERIFIED / DISCREPANCY / UNVERIFIABLE / FAILED"]
277
290
  ```
278
291
 
279
292
  Every extracted row carries an immutable `transaction_hash`, an
@@ -313,7 +326,7 @@ for the full surface.
313
326
  |---|---|
314
327
  | **Golden Rule verification** *(v0.0.5)* | Every result carries `opening + credits − debits == closing` status: `VERIFIED`, `DISCREPANCY`, `UNVERIFIABLE`, or `FAILED`. |
315
328
  | **Multi-currency verification** *(v0.0.8)* | `verify_balance_multi_currency()` groups transactions by currency and runs the Golden Rule independently per group — no more false `DISCREPANCY` on multi-currency statements. |
316
- | **Idempotent dedup** *(v0.0.5)* | Every `Transaction` carries a stable `transaction_hash` (MD5 of date + normalized description + amount). `Deduplicator.dedupe_by_hash()` makes incremental ingestion safe to re-run. |
329
+ | **Idempotent dedup** *(v0.0.5)* | Every `Transaction` carries a stable `transaction_hash` (versioned SHA-256 of account, currency, date, description, amount, and bank identity). `Deduplicator.dedupe_by_hash()` makes incremental ingestion safe to re-run. |
317
330
  | **Interactive review** *(v0.0.6)* | `--type review` CLI walks through discrepancies with accept/edit/skip/delete/quit. `IngestResult.to_json()` / `.from_json()` for stable round-trip with embedded audit trail. |
318
331
 
319
332
  ### Enrichment & export
@@ -332,17 +345,18 @@ for the full surface.
332
345
  |---|---|
333
346
  | **PII redaction** | Names, IBANs, and addresses masked by default — opt in with `--show-pii` |
334
347
  | **Secure ZIP** | `iter_secure_xml_entries()` rejects zip bombs, encrypted entries, and suspicious compression ratios |
335
- | **Tested** | 869 tests, coverage gated at 100% in CI, property-based fuzzing with Hypothesis |
348
+ | **Tested** | 1007 tests, coverage gated at 100% in CI, property-based fuzzing with Hypothesis |
336
349
 
337
350
  ---
338
351
 
339
352
  ## PII Redaction
340
353
 
341
354
  PII (names, IBANs, addresses) is **redacted by default** in
342
- console output and streaming mode.
355
+ CLI console output. Python parser methods return full records unless
356
+ `redact_pii=True` is supplied.
343
357
 
344
358
  ```python
345
- # Redacted by default
359
+ # Request redaction explicitly in Python
346
360
  for tx in parser.parse_streaming(redact_pii=True):
347
361
  print(tx) # Names and addresses show as ***REDACTED***
348
362
 
@@ -351,8 +365,9 @@ for tx in parser.parse_streaming(redact_pii=False):
351
365
  print(tx)
352
366
  ```
353
367
 
354
- File exports (CSV, JSON, Excel) always contain the full unredacted
355
- data.
368
+ Regular and hybrid file exports contain full records. Legacy CLI streaming
369
+ exports follow `--show-pii`; Python exports reflect the records supplied.
370
+ Choose redaction explicitly before sharing an exported file.
356
371
 
357
372
  ---
358
373
 
@@ -399,11 +414,13 @@ Process multiple files simultaneously across CPU cores:
399
414
  ```python
400
415
  from bankstatementparser import parse_files_parallel
401
416
 
402
- results = parse_files_parallel([
403
- "statements/jan.xml",
404
- "statements/feb.xml",
405
- "statements/mar.xml",
406
- ])
417
+ results = parse_files_parallel(
418
+ [
419
+ "statements/jan.xml",
420
+ "statements/feb.xml",
421
+ "statements/mar.xml",
422
+ ]
423
+ )
407
424
 
408
425
  for r in results:
409
426
  print(r.path, r.status, len(r.transactions), "rows")
@@ -652,13 +669,22 @@ versioned companion packages build on it — each is its own repository
652
669
  and Python package, so you install only what you need and the core
653
670
  stays dependency-light.
654
671
 
655
- | Package | PyPI | Role | What it adds |
656
- |---|---|---|---|
657
- | [`bankstatementparser-mcp`](https://github.com/sebastienrousseau/bankstatementparser-mcp) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-mcp.svg)](https://pypi.org/project/bankstatementparser-mcp/) | AI agents | [Model Context Protocol](https://modelcontextprotocol.io) server — exposes detect / parse / validate / summarize as tools for Claude Desktop and other LLM clients |
658
- | [`bankstatementparser-lsp`](https://github.com/sebastienrousseau/bankstatementparser-lsp) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-lsp.svg)](https://pypi.org/project/bankstatementparser-lsp/) | Editors | Language Server with live MT940 diagnostics (missing tags, malformed balance / `:61:` lines) over [pygls](https://github.com/openlawlibrary/pygls) |
659
- | [`bankstatementparser-writer-xlsx`](https://github.com/sebastienrousseau/bankstatementparser-writer-xlsx) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-writer-xlsx.svg)](https://pypi.org/project/bankstatementparser-writer-xlsx/) | Output | Write parsed transactions (DataFrame, `Transaction` list, or dicts) to a polished Excel `.xlsx` workbook |
660
- | [`bankstatementparser-loader-mt942`](https://github.com/sebastienrousseau/bankstatementparser-loader-mt942) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-mt942.svg)](https://pypi.org/project/bankstatementparser-loader-mt942/) | Input | Parse SWIFT **MT942** interim transaction reports into `Transaction` objects (a format the core does not read) |
661
- | [`bankstatementparser-loader-bai2`](https://github.com/sebastienrousseau/bankstatementparser-loader-bai2) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-bai2.svg)](https://pypi.org/project/bankstatementparser-loader-bai2/) | Input | Parse **BAI2** cash-management files into `Transaction` objects (a format the core does not read) |
672
+ | Package | GitHub Repository | PyPI | Role | Description |
673
+ |---|---|---|---|---|
674
+ | [`bankstatementparser`](https://github.com/sebastienrousseau/bankstatementparser) | [`sebastienrousseau/bankstatementparser`](https://github.com/sebastienrousseau/bankstatementparser) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser.svg)](https://pypi.org/project/bankstatementparser/) | Core Engine | Unified parser for CAMT (052/053), PAIN.001, CSV, OFX, QFX, MT940, and PDF statements |
675
+ | [`bankstatementparser-mcp`](https://github.com/sebastienrousseau/bankstatementparser-mcp) | [`sebastienrousseau/bankstatementparser-mcp`](https://github.com/sebastienrousseau/bankstatementparser-mcp) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-mcp.svg)](https://pypi.org/project/bankstatementparser-mcp/) | AI Protocol | Model Context Protocol (MCP) server exposing statement tools to LLMs & AI agents |
676
+ | [`bankstatementparser-lsp`](https://github.com/sebastienrousseau/bankstatementparser-lsp) | [`sebastienrousseau/bankstatementparser-lsp`](https://github.com/sebastienrousseau/bankstatementparser-lsp) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-lsp.svg)](https://pypi.org/project/bankstatementparser-lsp/) | Developer Tooling | Language Server Protocol (LSP) with live SWIFT MT940 statement validation & diagnostics |
677
+ | [`bankstatementparser-transport-ebics`](https://github.com/sebastienrousseau/bankstatementparser-transport-ebics) | [`sebastienrousseau/bankstatementparser-transport-ebics`](https://github.com/sebastienrousseau/bankstatementparser-transport-ebics) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-transport-ebics.svg)](https://pypi.org/project/bankstatementparser-transport-ebics/) | Transport | Automated bank statement retrieval over EBICS 3.0 (`H005`) and 2.5 (`H004`) protocols |
678
+ | [`bankstatementparser-writer-xlsx`](https://github.com/sebastienrousseau/bankstatementparser-writer-xlsx) | [`sebastienrousseau/bankstatementparser-writer-xlsx`](https://github.com/sebastienrousseau/bankstatementparser-writer-xlsx) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-writer-xlsx.svg)](https://pypi.org/project/bankstatementparser-writer-xlsx/) | Output Writer | Formats and exports parsed banking transactions into styled Microsoft Excel (`.xlsx`) workbooks |
679
+ | [`bankstatementparser-writer-qif`](https://github.com/sebastienrousseau/bankstatementparser-writer-qif) | [`sebastienrousseau/bankstatementparser-writer-qif`](https://github.com/sebastienrousseau/bankstatementparser-writer-qif) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-writer-qif.svg)](https://pypi.org/project/bankstatementparser-writer-qif/) | Output Writer | Serializes transactions into standard Quicken Interchange Format (`.qif`) exchange files |
680
+ | [`bankstatementparser-writer-ofx`](https://github.com/sebastienrousseau/bankstatementparser-writer-ofx) | [`sebastienrousseau/bankstatementparser-writer-ofx`](https://github.com/sebastienrousseau/bankstatementparser-writer-ofx) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-writer-ofx.svg)](https://pypi.org/project/bankstatementparser-writer-ofx/) | Output Writer | Serializes transactions into standard Open Financial Exchange (`.ofx`) XML/SGML files |
681
+ | [`bankstatementparser-writer-swift`](https://github.com/sebastienrousseau/bankstatementparser-writer-swift) | [`sebastienrousseau/bankstatementparser-writer-swift`](https://github.com/sebastienrousseau/bankstatementparser-writer-swift) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-writer-swift.svg)](https://pypi.org/project/bankstatementparser-writer-swift/) | Output Writer | Exports transactions to SWIFT MT940 customer statements and MT942 interim reports |
682
+ | [`bankstatementparser-loader-bai2`](https://github.com/sebastienrousseau/bankstatementparser-loader-bai2) | [`sebastienrousseau/bankstatementparser-loader-bai2`](https://github.com/sebastienrousseau/bankstatementparser-loader-bai2) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-bai2.svg)](https://pypi.org/project/bankstatementparser-loader-bai2/) | Input Loader | Parses BAI2 cash-management and account balance statements |
683
+ | [`bankstatementparser-loader-mt942`](https://github.com/sebastienrousseau/bankstatementparser-loader-mt942) | [`sebastienrousseau/bankstatementparser-loader-mt942`](https://github.com/sebastienrousseau/bankstatementparser-loader-mt942) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-mt942.svg)](https://pypi.org/project/bankstatementparser-loader-mt942/) | Input Loader | Parses SWIFT MT942 interim transaction reports with credit/debit summary reconciliation |
684
+ | [`bankstatementparser-loader-cfonb`](https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb) | [`sebastienrousseau/bankstatementparser-loader-cfonb`](https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-cfonb.svg)](https://pypi.org/project/bankstatementparser-loader-cfonb/) | Input Loader | Parses French CFONB 120 / AFB120 120-byte fixed-width banking statement files |
685
+ | [`bankstatementparser-loader-camt054`](https://github.com/sebastienrousseau/bankstatementparser-loader-camt054) | [`sebastienrousseau/bankstatementparser-loader-camt054`](https://github.com/sebastienrousseau/bankstatementparser-loader-camt054) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-camt054.svg)](https://pypi.org/project/bankstatementparser-loader-camt054/) | Input Loader | Ingests ISO 20022 CAMT.054 real-time debit/credit notification stream XML |
686
+ | [`bankstatementparser-loader-sepa`](https://github.com/sebastienrousseau/bankstatementparser-loader-sepa) | [`sebastienrousseau/bankstatementparser-loader-sepa`](https://github.com/sebastienrousseau/bankstatementparser-loader-sepa) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-sepa.svg)](https://pypi.org/project/bankstatementparser-loader-sepa/) | Input Loader | Ingests ISO 20022 SEPA PAIN.002 payment status reports and PAIN.008 direct debit mandates |
687
+ | [`bankstatementparser-loader-bacs`](https://github.com/sebastienrousseau/bankstatementparser-loader-bacs) | [`sebastienrousseau/bankstatementparser-loader-bacs`](https://github.com/sebastienrousseau/bankstatementparser-loader-bacs) | [![PyPI](https://img.shields.io/pypi/v/bankstatementparser-loader-bacs.svg)](https://pypi.org/project/bankstatementparser-loader-bacs/) | Input Loader | Parses UK BACS Standard 18 / Faster Payments 106-byte fixed-width transmission files |
662
688
 
663
689
  Loaders turn an additional source format into the same unified
664
690
  `Transaction` model; writers take parsed data back out to another
@@ -666,8 +692,8 @@ target. Each companion pins `bankstatementparser` as a dependency and
666
692
  ships its own 100%-coverage test suite.
667
693
 
668
694
  ```bash
669
- # Mix and match: e.g. read an MT942 file, then export to Excel
670
- pip install bankstatementparser-loader-mt942 bankstatementparser-writer-xlsx
695
+ # Mix and match: e.g. fetch via EBICS 3.0, parse CAMT.053, and export to SWIFT MT940 or Excel
696
+ pip install bankstatementparser-transport-ebics bankstatementparser-writer-swift bankstatementparser-writer-xlsx
671
697
  ```
672
698
 
673
699
  Loaders hand back the same `Transaction` model the core parsers
@@ -679,15 +705,15 @@ cleanly — see each companion's README for runnable examples.
679
705
  ## Project Layout
680
706
 
681
707
  ```text
682
- bankstatementparser/ Source code (32 modules)
708
+ bankstatementparser/ Source code (39 modules)
683
709
  bankstatementparser/hybrid/ PDF pipeline: orchestrator, llm_extractor, vision, scanner, ollama_direct, verification
684
710
  bankstatementparser/enrichment/ Categorizer, AccountMapper, EnrichedTransaction
685
- bankstatementparser/export/ hledger + beancount journal export
711
+ bankstatementparser/export/ hledger + beancount journal export, Apache Parquet columnar export
686
712
  bankstatementparser/api.py REST API microservice (FastAPI)
687
713
  docs/compliance/ ISO 13485 validation, risk register, traceability matrix
688
714
  examples/ 14 deterministic + 9 hybrid runnable example scripts
689
715
  scripts/ SBOM generation, checksums, signature verification
690
- tests/ 869 tests (unit, integration, property-based, security, hybrid mocks)
716
+ tests/ 1007 tests (unit, integration, property-based, security, hybrid mocks)
691
717
  ```
692
718
 
693
719
  ---
@@ -759,8 +785,9 @@ No. Zero network calls. XML parsers enforce `no_network=True`. No
759
785
  cloud, no telemetry.
760
786
 
761
787
  **Is PII redacted automatically?**
762
- Yes. Names, IBANs, and addresses are masked by default in console
763
- output and streaming. File exports retain full data.
788
+ CLI console output masks personal fields by default. Python callers
789
+ must request `redact_pii=True`. Regular file exports retain full data;
790
+ legacy streaming exports follow `--show-pii`.
764
791
 
765
792
  **Is the extraction deterministic?**
766
793
  Yes. Same input produces byte-identical output. Critical for