v0.0.8 — Full Platform
Full Platform. Closes every gap identified in the competitive analysis. Five new features: multi-currency balance verification, hledger/beancount export, bulk directory scanner, account mapping rules, and a REST API microservice.
New features
1. Multi-currency balance verification
from bankstatementparser.hybrid import verify_balance_multi_currency
results = verify_balance_multi_currency(transactions, balances={
"GBP": (Decimal("500"), Decimal("570")),
"EUR": (Decimal("1000"), Decimal("1150")),
})Groups by Transaction.currency, runs the Golden Rule independently per group. No more false DISCREPANCY on multi-currency statements.
2. hledger + beancount export
from bankstatementparser.export import to_hledger, to_beancount
Path("journal.ledger").write_text(to_hledger(transactions))
Path("journal.beancount").write_text(to_beancount(transactions))Uses Transaction.category as the contra-account when set by the enrichment module. Zero external dependencies.
3. Bulk directory scanner
from bankstatementparser.hybrid import scan_and_ingest
batch = scan_and_ingest("statements/", pattern="**/*.pdf")
print(f"{batch.file_count} files, {batch.total_unique} unique transactions")Scans a folder tree, runs smart_ingest on every match, deduplicates across the entire batch. Supports seen_hashes for cross-batch persistence.
4. Account mapping rules
from bankstatementparser.enrichment import AccountMapper
mapper = AccountMapper.from_json("mapping.json")
accounts = mapper.map_batch(transactions)Ordered regex rules, first match wins, loaded from JSON config. Pairs with the ledger exporter for end-to-end plaintext-accounting workflows.
5. REST API
pip install 'bankstatementparser[api]'
bankstatementparser-api --port 8000
# POST a file, get JSON back
curl -F file=@statement.pdf http://localhost:8000/ingest
curl http://localhost:8000/healthFastAPI microservice with /ingest and /health. Default bind 127.0.0.1 (safe); use --host 0.0.0.0 for containers. Gated behind [api] extra.
Install
pip install bankstatementparser # core
pip install 'bankstatementparser[hybrid]' # + text-LLM
pip install 'bankstatementparser[hybrid-vision]' # + vision
pip install 'bankstatementparser[enrichment]' # + categorization
pip install 'bankstatementparser[api]' # + REST APITest plan
- 723 tests at 100% line + branch coverage
mypy --strictclean on 29 source filesruff check+bandit -rclean- Python 3.14 asyncio compatibility fix included
- 44 CI checks pass
Full changelog: CHANGELOG.md
Pull request: #52