bankstatementparser 0.0.28__tar.gz → 0.0.30__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 (62) hide show
  1. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/PKG-INFO +45 -25
  2. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/README.md +35 -20
  3. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/__init__.py +1 -1
  4. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/export/__init__.py +2 -1
  5. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/pyproject.toml +25 -11
  6. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/LICENSE +0 -0
  7. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/LICENSE-APACHE +0 -0
  8. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/LICENSE-MIT +0 -0
  9. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/_amounts.py +0 -0
  10. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/_llm_common.py +0 -0
  11. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/additional_parsers.py +0 -0
  12. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/analytics/__init__.py +0 -0
  13. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/analytics/cash_flow.py +0 -0
  14. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/analytics/common.py +0 -0
  15. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/analytics/models.py +0 -0
  16. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/analytics/patterns.py +0 -0
  17. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/api.py +0 -0
  18. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/api_limits.py +0 -0
  19. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/api_worker.py +0 -0
  20. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/bank_statement_parsers.py +0 -0
  21. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/base_parser.py +0 -0
  22. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/camt_parser.py +0 -0
  23. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/camt_reports.py +0 -0
  24. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/cli.py +0 -0
  25. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/enrichment/__init__.py +0 -0
  26. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/enrichment/account_mapper.py +0 -0
  27. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/enrichment/categorizer.py +0 -0
  28. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/exceptions.py +0 -0
  29. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/export/ledger.py +0 -0
  30. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/export/parquet.py +0 -0
  31. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/field86_parser.py +0 -0
  32. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/forensics.py +0 -0
  33. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/hybrid/__init__.py +0 -0
  34. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/hybrid/evaluation.py +0 -0
  35. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/hybrid/llm_extractor.py +0 -0
  36. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/hybrid/ollama_direct.py +0 -0
  37. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/hybrid/orchestrator.py +0 -0
  38. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/hybrid/pdf_text.py +0 -0
  39. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/hybrid/prompts.py +0 -0
  40. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/hybrid/scanner.py +0 -0
  41. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/hybrid/verification.py +0 -0
  42. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/hybrid/vision.py +0 -0
  43. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/input_validator.py +0 -0
  44. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/pain001_parser.py +0 -0
  45. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/parallel.py +0 -0
  46. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/parsers/__init__.py +0 -0
  47. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/parsers/bai2.py +0 -0
  48. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/parsers/common.py +0 -0
  49. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/parsers/csv_parser.py +0 -0
  50. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/parsers/mt940.py +0 -0
  51. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/parsers/mt942.py +0 -0
  52. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/parsers/ofx.py +0 -0
  53. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/plugins.py +0 -0
  54. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/privacy.py +0 -0
  55. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/py.typed +0 -0
  56. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/reconciliation.py +0 -0
  57. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/record_types.py +0 -0
  58. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/telemetry.py +0 -0
  59. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/transaction_deduplicator.py +0 -0
  60. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/transaction_models.py +0 -0
  61. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/xml_validator.py +0 -0
  62. {bankstatementparser-0.0.28 → bankstatementparser-0.0.30}/bankstatementparser/zip_security.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bankstatementparser
3
- Version: 0.0.28
3
+ Version: 0.0.30
4
4
  Summary: Parse bank statements (CAMT, PAIN.001, MT940, MT942, OFX, BAI2, CSV, and PDF) into unified Transactions with treasury analytics, 2-way reconciliation, PDF forensics, and ledger export.
5
5
  License: Apache-2.0 OR MIT
6
6
  License-File: LICENSE
@@ -25,17 +25,22 @@ Provides-Extra: hybrid-plus
25
25
  Provides-Extra: hybrid-vision
26
26
  Provides-Extra: parquet
27
27
  Provides-Extra: polars
28
+ Requires-Dist: aiohttp (>=3.14.4) ; (python_version < "3.14") and (extra == "hybrid" or extra == "hybrid-plus" or extra == "hybrid-vision" or extra == "enrichment")
29
+ Requires-Dist: certifi (>=2026.10.19) ; extra == "hybrid" or extra == "hybrid-plus" or extra == "hybrid-vision" or extra == "enrichment"
28
30
  Requires-Dist: defusedxml (>=0.7.1,<0.8.0)
29
31
  Requires-Dist: fastapi (>=0.115.0) ; extra == "api"
30
- Requires-Dist: litellm (>=1.83.10) ; (python_version < "3.14") and (extra == "hybrid" or extra == "hybrid-plus" or extra == "hybrid-vision" or extra == "enrichment")
32
+ Requires-Dist: filelock (>=4.2.1) ; (python_version >= "3.11" and python_version < "3.14") and (extra == "hybrid" or extra == "hybrid-plus" or extra == "hybrid-vision" or extra == "enrichment")
33
+ Requires-Dist: litellm (>=1.108.3) ; (python_version >= "3.11" and python_version < "3.14") and (extra == "hybrid" or extra == "hybrid-plus" or extra == "hybrid-vision" or extra == "enrichment")
31
34
  Requires-Dist: lxml (>=5.0)
32
35
  Requires-Dist: openpyxl (>=3.1.5,<4.0.0) ; extra == "excel"
36
+ Requires-Dist: opentelemetry-api (>=1.45.2) ; extra == "api"
33
37
  Requires-Dist: pandas (>=2.3.3,<3.0.0)
34
- Requires-Dist: pdfplumber (>=0.11.0) ; extra == "hybrid-plus"
35
- Requires-Dist: polars (>=1.32.0,<2.0.0) ; extra == "polars"
38
+ Requires-Dist: pdfplumber (>=0.11.0) ; (python_version >= "3.11") and (extra == "hybrid-plus")
39
+ Requires-Dist: pillow (>=13.0.0) ; (python_version >= "3.11") and (extra == "hybrid-plus")
40
+ Requires-Dist: polars (>=1.32.0,<3) ; extra == "polars"
36
41
  Requires-Dist: pyarrow (>=14.0.0) ; extra == "parquet"
37
42
  Requires-Dist: pydantic (>=2.11.0,<3.0.0)
38
- Requires-Dist: pypdf (>=4.0.0) ; extra == "hybrid" or extra == "hybrid-plus" or extra == "hybrid-vision"
43
+ Requires-Dist: pypdf (>=6.21.3) ; extra == "hybrid" or extra == "hybrid-plus" or extra == "hybrid-vision"
39
44
  Requires-Dist: pypdfium2 (>=4.30.0) ; extra == "hybrid-vision"
40
45
  Requires-Dist: python-multipart (>=0.0.32) ; extra == "api"
41
46
  Requires-Dist: uvicorn (>=0.34.0) ; extra == "api"
@@ -63,11 +68,13 @@ Description-Content-Type: text/markdown
63
68
  </p>
64
69
 
65
70
  <p align="center">
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>
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.28" alt="PyPI" /></a>
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>
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>
70
- <a href="LICENSE"><img src="https://img.shields.io/github/license/sebastienrousseau/bankstatementparser?style=for-the-badge" alt="License" /></a>
71
+ <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" height="28" /></a>
72
+ <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/v/bankstatementparser?style=for-the-badge&color=fc8d62&logo=python&v=0.0.30" alt="PyPI version" height="28" /></a>
73
+ <a href="https://bankstatementparser.com"><img src="https://img.shields.io/badge/docs-bankstatementparser.com-blue?style=for-the-badge&labelColor=555555&logo=googlechrome" alt="Docs" height="28" /></a>
74
+ <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/pyversions/bankstatementparser.svg?style=for-the-badge" alt="Python versions" height="28" /></a>
75
+ <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/dm/bankstatementparser.svg?style=for-the-badge" alt="PyPI downloads" height="28" /></a>
76
+ <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" height="28" /></a>
77
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg?style=for-the-badge" alt="License: Apache-2.0 OR MIT" height="28" /></a>
71
78
  </p>
72
79
 
73
80
  ---
@@ -170,9 +177,14 @@ required.
170
177
  > CSV, OFX, QFX, MT940, MT942, BAI2) supports Python **3.10–3.14**. The optional
171
178
  > `[hybrid]`, `[hybrid-plus]`, `[hybrid-vision]`, and
172
179
  > `[enrichment]` extras pull in `litellm`, which currently requires
173
- > **Python <3.14** upstream — on Python 3.14 the LLM extras will
174
- > not install. Pin `Python 3.13` for the full hybrid pipeline;
175
- > upgrade to 3.14 freely if you only need deterministic parsing.
180
+ > **Python <3.14** upstream, and filelock, whose first release
181
+ > without open advisories (4.2.1) dropped 3.10. The LLM extras
182
+ > therefore need Python **3.11–3.13**; on 3.10 or 3.14 they install
183
+ > without `litellm`. Use Python 3.11–3.13 for the full hybrid
184
+ > pipeline; any supported version works for deterministic parsing.
185
+ > The `pdfplumber` engine in `[hybrid-plus]` needs Python **3.11+**:
186
+ > it pulls Pillow, whose first release without open advisories
187
+ > (13.0.0) dropped 3.10, so on 3.10 the extra installs without it.
176
188
 
177
189
  ### Local development
178
190
 
@@ -608,15 +620,23 @@ Install with `pip install bankstatementparser[polars]`.
608
620
  Export transactions to Apache Parquet columnar files in batch or streaming mode:
609
621
 
610
622
  ```python
623
+ import pyarrow as pa
611
624
  from bankstatementparser.export import export_parquet, ParquetStreamWriter
612
625
 
613
626
  # Batch export
614
627
  export_parquet(transactions, "output.parquet")
615
628
 
616
- # Streaming export with bounded memory and atomic file commits
617
- with ParquetStreamWriter("output_stream.parquet", batch_size=1000) as writer:
629
+ # Streaming export with bounded memory and atomic file commits. The writer
630
+ # takes mappings and an explicit Arrow schema covering every field written.
631
+ schema = pa.schema([
632
+ ("booking_date", pa.date32()),
633
+ ("amount", pa.decimal128(18, 2)),
634
+ ("currency", pa.string()),
635
+ ("description", pa.string()),
636
+ ])
637
+ with ParquetStreamWriter("output_stream.parquet", schema=schema, batch_size=1000) as writer:
618
638
  for tx in transactions:
619
- writer.write_record(tx)
639
+ writer.write_record(tx.model_dump(include=set(schema.names)))
620
640
  ```
621
641
 
622
642
  Install with `pip install 'bankstatementparser[parquet]'`.
@@ -738,22 +758,22 @@ versioned companion packages build on it — each is its own repository
738
758
  and Python package, so you install only what you need and the core
739
759
  stays dependency-light.
740
760
 
741
- | Package | GitHub Repository | PyPI | Role | Description |
761
+ | Package | GitHub Repository | Release / PyPI | Role | Description |
742
762
  |---|---|---|---|---|
743
763
  | [`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/054), PAIN.001, CSV, OFX, QFX, MT940, MT942, BAI2, and PDF statements |
744
764
  | [`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 |
745
765
  | [`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 |
746
- | [`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 |
766
+ | [`bankstatementparser-transport-ebics`](https://github.com/sebastienrousseau/bankstatementparser-transport-ebics) | [`sebastienrousseau/bankstatementparser-transport-ebics`](https://github.com/sebastienrousseau/bankstatementparser-transport-ebics) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-transport-ebics.svg)](https://github.com/sebastienrousseau/bankstatementparser-transport-ebics/releases) | Transport | Automated bank statement retrieval over EBICS 3.0 (`H005`) and 2.5 (`H004`) protocols |
747
767
  | [`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 |
748
- | [`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 |
749
- | [`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 |
750
- | [`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 |
768
+ | [`bankstatementparser-writer-qif`](https://github.com/sebastienrousseau/bankstatementparser-writer-qif) | [`sebastienrousseau/bankstatementparser-writer-qif`](https://github.com/sebastienrousseau/bankstatementparser-writer-qif) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-writer-qif.svg)](https://github.com/sebastienrousseau/bankstatementparser-writer-qif/releases) | Output Writer | Serializes transactions into standard Quicken Interchange Format (`.qif`) exchange files |
769
+ | [`bankstatementparser-writer-ofx`](https://github.com/sebastienrousseau/bankstatementparser-writer-ofx) | [`sebastienrousseau/bankstatementparser-writer-ofx`](https://github.com/sebastienrousseau/bankstatementparser-writer-ofx) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-writer-ofx.svg)](https://github.com/sebastienrousseau/bankstatementparser-writer-ofx/releases) | Output Writer | Serializes transactions into standard Open Financial Exchange (`.ofx`) XML/SGML files |
770
+ | [`bankstatementparser-writer-swift`](https://github.com/sebastienrousseau/bankstatementparser-writer-swift) | [`sebastienrousseau/bankstatementparser-writer-swift`](https://github.com/sebastienrousseau/bankstatementparser-writer-swift) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-writer-swift.svg)](https://github.com/sebastienrousseau/bankstatementparser-writer-swift/releases) | Output Writer | Exports transactions to SWIFT MT940 customer statements and MT942 interim reports |
751
771
  | [`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 |
752
772
  | [`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 |
753
- | [`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 |
754
- | [`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 |
755
- | [`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 |
756
- | [`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 |
773
+ | [`bankstatementparser-loader-cfonb`](https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb) | [`sebastienrousseau/bankstatementparser-loader-cfonb`](https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-loader-cfonb.svg)](https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb/releases) | Input Loader | Parses French CFONB 120 / AFB120 120-byte fixed-width banking statement files |
774
+ | [`bankstatementparser-loader-camt054`](https://github.com/sebastienrousseau/bankstatementparser-loader-camt054) | [`sebastienrousseau/bankstatementparser-loader-camt054`](https://github.com/sebastienrousseau/bankstatementparser-loader-camt054) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-loader-camt054.svg)](https://github.com/sebastienrousseau/bankstatementparser-loader-camt054/releases) | Input Loader | Ingests ISO 20022 CAMT.054 real-time debit/credit notification stream XML |
775
+ | [`bankstatementparser-loader-sepa`](https://github.com/sebastienrousseau/bankstatementparser-loader-sepa) | [`sebastienrousseau/bankstatementparser-loader-sepa`](https://github.com/sebastienrousseau/bankstatementparser-loader-sepa) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-loader-sepa.svg)](https://github.com/sebastienrousseau/bankstatementparser-loader-sepa/releases) | Input Loader | Ingests ISO 20022 SEPA PAIN.002 payment status reports and PAIN.008 direct debit mandates |
776
+ | [`bankstatementparser-loader-bacs`](https://github.com/sebastienrousseau/bankstatementparser-loader-bacs) | [`sebastienrousseau/bankstatementparser-loader-bacs`](https://github.com/sebastienrousseau/bankstatementparser-loader-bacs) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-loader-bacs.svg)](https://github.com/sebastienrousseau/bankstatementparser-loader-bacs/releases) | Input Loader | Parses UK BACS Standard 18 / Faster Payments 106-byte fixed-width transmission files |
757
777
 
758
778
  Loaders turn an additional source format into the same unified
759
779
  `Transaction` model; writers take parsed data back out to another
@@ -18,11 +18,13 @@
18
18
  </p>
19
19
 
20
20
  <p align="center">
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>
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.28" alt="PyPI" /></a>
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>
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>
25
- <a href="LICENSE"><img src="https://img.shields.io/github/license/sebastienrousseau/bankstatementparser?style=for-the-badge" alt="License" /></a>
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" height="28" /></a>
22
+ <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/v/bankstatementparser?style=for-the-badge&color=fc8d62&logo=python&v=0.0.30" alt="PyPI version" height="28" /></a>
23
+ <a href="https://bankstatementparser.com"><img src="https://img.shields.io/badge/docs-bankstatementparser.com-blue?style=for-the-badge&labelColor=555555&logo=googlechrome" alt="Docs" height="28" /></a>
24
+ <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/pyversions/bankstatementparser.svg?style=for-the-badge" alt="Python versions" height="28" /></a>
25
+ <a href="https://pypi.org/project/bankstatementparser/"><img src="https://img.shields.io/pypi/dm/bankstatementparser.svg?style=for-the-badge" alt="PyPI downloads" height="28" /></a>
26
+ <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" height="28" /></a>
27
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg?style=for-the-badge" alt="License: Apache-2.0 OR MIT" height="28" /></a>
26
28
  </p>
27
29
 
28
30
  ---
@@ -125,9 +127,14 @@ required.
125
127
  > CSV, OFX, QFX, MT940, MT942, BAI2) supports Python **3.10–3.14**. The optional
126
128
  > `[hybrid]`, `[hybrid-plus]`, `[hybrid-vision]`, and
127
129
  > `[enrichment]` extras pull in `litellm`, which currently requires
128
- > **Python <3.14** upstream — on Python 3.14 the LLM extras will
129
- > not install. Pin `Python 3.13` for the full hybrid pipeline;
130
- > upgrade to 3.14 freely if you only need deterministic parsing.
130
+ > **Python <3.14** upstream, and filelock, whose first release
131
+ > without open advisories (4.2.1) dropped 3.10. The LLM extras
132
+ > therefore need Python **3.11–3.13**; on 3.10 or 3.14 they install
133
+ > without `litellm`. Use Python 3.11–3.13 for the full hybrid
134
+ > pipeline; any supported version works for deterministic parsing.
135
+ > The `pdfplumber` engine in `[hybrid-plus]` needs Python **3.11+**:
136
+ > it pulls Pillow, whose first release without open advisories
137
+ > (13.0.0) dropped 3.10, so on 3.10 the extra installs without it.
131
138
 
132
139
  ### Local development
133
140
 
@@ -563,15 +570,23 @@ Install with `pip install bankstatementparser[polars]`.
563
570
  Export transactions to Apache Parquet columnar files in batch or streaming mode:
564
571
 
565
572
  ```python
573
+ import pyarrow as pa
566
574
  from bankstatementparser.export import export_parquet, ParquetStreamWriter
567
575
 
568
576
  # Batch export
569
577
  export_parquet(transactions, "output.parquet")
570
578
 
571
- # Streaming export with bounded memory and atomic file commits
572
- with ParquetStreamWriter("output_stream.parquet", batch_size=1000) as writer:
579
+ # Streaming export with bounded memory and atomic file commits. The writer
580
+ # takes mappings and an explicit Arrow schema covering every field written.
581
+ schema = pa.schema([
582
+ ("booking_date", pa.date32()),
583
+ ("amount", pa.decimal128(18, 2)),
584
+ ("currency", pa.string()),
585
+ ("description", pa.string()),
586
+ ])
587
+ with ParquetStreamWriter("output_stream.parquet", schema=schema, batch_size=1000) as writer:
573
588
  for tx in transactions:
574
- writer.write_record(tx)
589
+ writer.write_record(tx.model_dump(include=set(schema.names)))
575
590
  ```
576
591
 
577
592
  Install with `pip install 'bankstatementparser[parquet]'`.
@@ -693,22 +708,22 @@ versioned companion packages build on it — each is its own repository
693
708
  and Python package, so you install only what you need and the core
694
709
  stays dependency-light.
695
710
 
696
- | Package | GitHub Repository | PyPI | Role | Description |
711
+ | Package | GitHub Repository | Release / PyPI | Role | Description |
697
712
  |---|---|---|---|---|
698
713
  | [`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/054), PAIN.001, CSV, OFX, QFX, MT940, MT942, BAI2, and PDF statements |
699
714
  | [`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 |
700
715
  | [`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 |
701
- | [`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 |
716
+ | [`bankstatementparser-transport-ebics`](https://github.com/sebastienrousseau/bankstatementparser-transport-ebics) | [`sebastienrousseau/bankstatementparser-transport-ebics`](https://github.com/sebastienrousseau/bankstatementparser-transport-ebics) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-transport-ebics.svg)](https://github.com/sebastienrousseau/bankstatementparser-transport-ebics/releases) | Transport | Automated bank statement retrieval over EBICS 3.0 (`H005`) and 2.5 (`H004`) protocols |
702
717
  | [`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 |
703
- | [`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 |
704
- | [`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 |
705
- | [`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 |
718
+ | [`bankstatementparser-writer-qif`](https://github.com/sebastienrousseau/bankstatementparser-writer-qif) | [`sebastienrousseau/bankstatementparser-writer-qif`](https://github.com/sebastienrousseau/bankstatementparser-writer-qif) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-writer-qif.svg)](https://github.com/sebastienrousseau/bankstatementparser-writer-qif/releases) | Output Writer | Serializes transactions into standard Quicken Interchange Format (`.qif`) exchange files |
719
+ | [`bankstatementparser-writer-ofx`](https://github.com/sebastienrousseau/bankstatementparser-writer-ofx) | [`sebastienrousseau/bankstatementparser-writer-ofx`](https://github.com/sebastienrousseau/bankstatementparser-writer-ofx) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-writer-ofx.svg)](https://github.com/sebastienrousseau/bankstatementparser-writer-ofx/releases) | Output Writer | Serializes transactions into standard Open Financial Exchange (`.ofx`) XML/SGML files |
720
+ | [`bankstatementparser-writer-swift`](https://github.com/sebastienrousseau/bankstatementparser-writer-swift) | [`sebastienrousseau/bankstatementparser-writer-swift`](https://github.com/sebastienrousseau/bankstatementparser-writer-swift) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-writer-swift.svg)](https://github.com/sebastienrousseau/bankstatementparser-writer-swift/releases) | Output Writer | Exports transactions to SWIFT MT940 customer statements and MT942 interim reports |
706
721
  | [`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 |
707
722
  | [`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 |
708
- | [`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 |
709
- | [`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 |
710
- | [`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 |
711
- | [`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 |
723
+ | [`bankstatementparser-loader-cfonb`](https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb) | [`sebastienrousseau/bankstatementparser-loader-cfonb`](https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-loader-cfonb.svg)](https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb/releases) | Input Loader | Parses French CFONB 120 / AFB120 120-byte fixed-width banking statement files |
724
+ | [`bankstatementparser-loader-camt054`](https://github.com/sebastienrousseau/bankstatementparser-loader-camt054) | [`sebastienrousseau/bankstatementparser-loader-camt054`](https://github.com/sebastienrousseau/bankstatementparser-loader-camt054) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-loader-camt054.svg)](https://github.com/sebastienrousseau/bankstatementparser-loader-camt054/releases) | Input Loader | Ingests ISO 20022 CAMT.054 real-time debit/credit notification stream XML |
725
+ | [`bankstatementparser-loader-sepa`](https://github.com/sebastienrousseau/bankstatementparser-loader-sepa) | [`sebastienrousseau/bankstatementparser-loader-sepa`](https://github.com/sebastienrousseau/bankstatementparser-loader-sepa) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-loader-sepa.svg)](https://github.com/sebastienrousseau/bankstatementparser-loader-sepa/releases) | Input Loader | Ingests ISO 20022 SEPA PAIN.002 payment status reports and PAIN.008 direct debit mandates |
726
+ | [`bankstatementparser-loader-bacs`](https://github.com/sebastienrousseau/bankstatementparser-loader-bacs) | [`sebastienrousseau/bankstatementparser-loader-bacs`](https://github.com/sebastienrousseau/bankstatementparser-loader-bacs) | [![Release](https://img.shields.io/github/v/release/sebastienrousseau/bankstatementparser-loader-bacs.svg)](https://github.com/sebastienrousseau/bankstatementparser-loader-bacs/releases) | Input Loader | Parses UK BACS Standard 18 / Faster Payments 106-byte fixed-width transmission files |
712
727
 
713
728
  Loaders turn an additional source format into the same unified
714
729
  `Transaction` model; writers take parsed data back out to another
@@ -107,7 +107,7 @@ from .zip_security import (
107
107
  #: so the conformance gate can compare it statically against
108
108
  #: pyproject.toml -- that comparison is the thing that catches drift, and
109
109
  #: a runtime lookup would make the two trivially equal and check nothing.
110
- __version__ = "0.0.28"
110
+ __version__ = "0.0.30"
111
111
 
112
112
  __all__ = [
113
113
  "AnalyticsReport",
@@ -18,9 +18,10 @@
18
18
  from __future__ import annotations
19
19
 
20
20
  from .ledger import to_beancount, to_hledger
21
- from .parquet import export_parquet, export_parquet_stream
21
+ from .parquet import ParquetStreamWriter, export_parquet, export_parquet_stream
22
22
 
23
23
  __all__ = [
24
+ "ParquetStreamWriter",
24
25
  "export_parquet",
25
26
  "export_parquet_stream",
26
27
  "to_beancount",
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "bankstatementparser"
3
- version = "0.0.28"
3
+ version = "0.0.30"
4
4
  description = "Parse bank statements (CAMT, PAIN.001, MT940, MT942, OFX, BAI2, CSV, and PDF) into unified Transactions with treasury analytics, 2-way reconciliation, PDF forensics, and ledger export."
5
5
  authors = ["Sebastien Rousseau <sebastian.rousseau@gmail.com>"]
6
6
  license = "Apache-2.0 OR MIT"
@@ -38,21 +38,35 @@ openpyxl = {version = "^3.1.5", optional = true}
38
38
  pandas = "^2.3.3"
39
39
  defusedxml = "^0.7.1"
40
40
  pydantic = "^2.11.0"
41
- polars = {version = "^1.32.0", optional = true}
42
- litellm = {version = ">=1.83.10", optional = true, python = "<3.14"}
43
- pypdf = {version = ">=4.0.0", optional = true}
44
- pdfplumber = {version = ">=0.11.0", optional = true}
41
+ polars = {version = ">=1.32.0,<3", optional = true}
42
+ # litellm 1.108.3 is the first release that accepts filelock 4, and the
43
+ # patched filelock needs Python 3.11, so the LLM extras do too.
44
+ litellm = {version = ">=1.108.3", optional = true, python = ">=3.11,<3.14"}
45
+ # CVE-2026-119206 and CVE-2026-119208: pypdf < 6.21.3.
46
+ pypdf = {version = ">=6.21.3", optional = true}
47
+ # pdfplumber pulls Pillow; the first Pillow without its open advisories
48
+ # (13.0.0) needs Python 3.11, so hybrid-plus does too.
49
+ pdfplumber = {version = ">=0.11.0", optional = true, python = ">=3.11"}
45
50
  pypdfium2 = {version = ">=4.30.0", optional = true}
46
51
  fastapi = {version = ">=0.115.0", optional = true}
47
52
  uvicorn = {version = ">=0.34.0", optional = true}
48
53
  python-multipart = {version = ">=0.0.32", optional = true}
49
54
  pyarrow = {version = ">=14.0.0", optional = true}
55
+ # Floors for packages the extras pull in transitively, set to the first
56
+ # release without a published advisory so no affected version resolves.
57
+ pillow = {version = ">=13.0.0", optional = true, python = ">=3.11"}
58
+ certifi = {version = ">=2026.10.19", optional = true}
59
+ aiohttp = {version = ">=3.14.4", optional = true, python = "<3.14"}
60
+ # GHSA-69hj-f68j-2879 and GHSA-8mx5-7m5m-r77g: filelock < 4.2.1.
61
+ filelock = {version = ">=4.2.1", optional = true, python = ">=3.11,<3.14"}
62
+ # GHSA-mf5v-w3w3-f6cg: opentelemetry-api <= 1.45.1, pulled in by fastapi.
63
+ opentelemetry-api = {version = ">=1.45.2", optional = true}
50
64
 
51
65
  [tool.poetry.group.dev.dependencies]
52
66
  pytest = ">=8.0.0,<10.0.0"
53
67
  pytest-cov = "^7.1.0"
54
68
  pytest-benchmark = "^5.1.0"
55
- ruff = ">=0.15.7,<0.17"
69
+ ruff = ">=0.15.7,<0.18"
56
70
  mypy = ">=1.5,<3"
57
71
  bandit = "^1.7.0"
58
72
  hypothesis = ">=6.82,<7"
@@ -73,11 +87,11 @@ mkdocstrings = {version = ">=0.27", extras = ["python"]}
73
87
  excel = ["openpyxl"]
74
88
  polars = ["polars"]
75
89
  parquet = ["pyarrow"]
76
- hybrid = ["litellm", "pypdf"]
77
- hybrid-plus = ["litellm", "pypdf", "pdfplumber"]
78
- hybrid-vision = ["litellm", "pypdf", "pypdfium2"]
79
- enrichment = ["litellm"]
80
- api = ["fastapi", "uvicorn", "python-multipart"]
90
+ hybrid = ["litellm", "pypdf", "certifi", "aiohttp", "filelock"]
91
+ hybrid-plus = ["litellm", "pypdf", "pdfplumber", "pillow", "certifi", "aiohttp", "filelock"]
92
+ hybrid-vision = ["litellm", "pypdf", "pypdfium2", "certifi", "aiohttp", "filelock"]
93
+ enrichment = ["litellm", "certifi", "aiohttp", "filelock"]
94
+ api = ["fastapi", "uvicorn", "python-multipart", "opentelemetry-api"]
81
95
 
82
96
  [tool.poetry.scripts]
83
97
  bankstatementparser = "bankstatementparser.cli:main"