Skip to main content Switch to mobile version bankstatementparser-loader-cfonb 0.0.36 French CFONB 120 / AFB120 fixed-width banking statement loader for bankstatementparser.
pip install bankstatementparser-loader-cfonb Copy PIP instructions
French CFONB 120 (AFB120) bank statement loader that parses fixed-width 120-character statements into bankstatementparser Transaction objects.
Requirements: toolchain floor, platforms
Quick Start: parse a statement in three lines
The bankstatementparser-loader-cfonb ecosystem
Capabilities at a glance: the current surface by theme
Ecosystem comparison: short matrix; full table at docs/COMPARISON.md
Benchmarks: headline numbers; full table at docs/BENCHMARKS.md
Features: public API, record layout, amounts and signs
Configuration: core options
Examples: runnable example index
When not to use bankstatementparser-loader-cfonb: limitations
Development: make targets, fuzzing, CI
Security: guarantees and compliance
Documentation: all reference docs
Stability guarantees: SemVer axis, output stability, minimum toolchain discipline
python -c "import bankstatementparser_loader_cfonb as b; print(b.__version__)" # -> 0.0.36 An isolated virtual environment keeps the loader's dependencies apart:
python -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows python -m pip install -U bankstatementparser-loader-cfonb Requirements
Python 3.10 or later. CI tests CPython 3.10, 3.11, 3.12, 3.13 and 3.14 on Linux, macOS and Windows; docs/POLICIES.md says when the floor moves.
bankstatementparser 0.0.35 or later, whose Transaction model and BankStatementParser base class the loader produces and extends.
No network access, native extensions or system packages of its own.
from bankstatementparser_loader_cfonb import load_cfonb_file for txn in load_cfonb_file("statement.cfonb"): print(txn.booking_date, txn.amount, txn.currency, txn.description) Or parse an in-memory payload:
bankstatementparser-loader-cfonb is one of the input loaders of the bankstatementparser suite, whose packages ship one version together. The full table is in The suite.
flowchart LR A["CFONB 120 file or str"] -->|load_cfonb / load_cfonb_file| B["bankstatementparser-loader-cfonb"] B -->|list of Transaction, source=cfonb| C["bankstatementparser pipeline"] A -->|summarize_cfonb| D["CfonbSummary"] Capabilities at a glance
The core bankstatementparser reads no CFONB. python-cfonb reads and writes it, with the same column layout. Every cell comes from the projects' own source code.
See docs/COMPARISON.md for the evidence and complete matrix.
benches/bench_load_cfonb.py times load_cfonb and summarize_cfonb on CFONB 120 statements of 10 to 50,000 operations, every other one with a 05 detail.
Cost per operation rises only 1.09x from 10 to 50,000 operations, and a summary costs at most 0.87x a full load.
See docs/BENCHMARKS.md for methodology and full results.
Every record is 120 characters and starts with its code: 01 (ancien solde, the opening balance), 04 (an operation), 05 (complementary detail of the preceding operation) or 07 (nouveau solde, the closing balance). The loader reads these columns (1-based, inclusive); tests/test_docs_accuracy.py checks every row of this table against the parser:
On 04 records a blank bank, branch, currency or account takes the 01 header's value.
Amount and sign convention
An amount zone (91-104) is 13 digits and a final character that carries both the units digit and the sign. The digits are divided by 10 ** decimals (column 20 of the 01 header) as a decimal.Decimal, never a float.
So 0000000001904} with 2 decimals is -190.40. Characters other than ASCII digits elsewhere in the zone are skipped, and an empty zone is 0.
None of the functions raises on malformed CFONB text: a line that is not a record is skipped, a date that does not parse is None (a value date falls back to the operation date), and an amount keeps its ASCII digits. load_cfonb_file raises OSError when the file cannot be read; undecodable bytes are replaced, not refused.
The loader has no options, configuration file or environment variables: the record layout and the sign convention above are fixed, so the same file always loads the same way. Installing the package registers CfonbStatementParser under the cfonb and afb120 names in the bankstatementparser.loaders entry-point group, which is how the core discovers it; nothing needs to be configured for that.
examples/ holds two runnable scripts, each run in CI against an inline sample, so no data files are needed:
python examples/01_basic_usage.py When not to use bankstatementparser-loader-cfonb
You need to write CFONB. This loader only reads; python-cfonb also writes statements and transfers.
You need the 05 qualifiers as fields. The loader appends each 05 record's text to the description; it does not split out the debtor, the mandate reference (RUM) or other qualified data.
You need several accounts kept apart. Operations from every 01...07 block load into one list (each keeps its own account_id), and the summary describes the last header and closing balance only.
You want malformed input refused. The loader is lenient by design: it skips what it cannot read rather than raising.
You have CFONB 240 or the 160-character transfer formats. This loader reads the 120-character statement layout only.
git clone https://github.com/sebastienrousseau/bankstatementparser-loader-cfonb.git cd bankstatementparser-loader-cfonb poetry install make check make check runs the local gates: ruff lint and format, mypy --strict, the complexity baseline (scripts/check_complexity.py), bandit, pytest with a 100% line + branch coverage floor, interrogate at 100% docstring coverage, and the examples. Other targets: make fuzz (Atheris, 60 s, Linux x86_64 with Python 3.12+), make bench, make audit (pip-audit on every locked set), make docs (the MkDocs manual, --strict) and make demo (re-renders the GIF above with VHS from .github/demo.tape). CI adds the OS by Python matrix, the fuzz run, CodeQL, pip-audit and the Docs Lint gates. CONTRIBUTING.md covers branches and commit signing.
Read-only. The loader only reads text and files you pass it; it writes nothing.
No XML, no network, no code execution. Parsing is fixed-column string slicing into dataclasses.
Decimal arithmetic for every amount, and only ASCII digits count as digits, so a stray character cannot become part of a number.
Fuzzing. fuzz/fuzz_load_cfonb.py drives load_cfonb and summarize_cfonb with Atheris in CI, seeded with the repository's fixtures, and fails on any exception, any malformed Transaction and any disagreement between the load and the summary.
Supply chain. Dependencies are locked in poetry.lock, CI installs hash-pinned exports of it, and pip-audit and CodeQL run on every change. Releases publish to PyPI through OIDC trusted publishing and carry cosign signatures, SLSA provenance and SBOMs; every workflow action is pinned by commit SHA except the SLSA generator, which must be referenced by tag.
Report vulnerabilities according to SECURITY.md.
User manual: sebastienrousseau.com/bankstatementparser-loader-cfonb, built from docs/ with MkDocs
API reference: the manual's API page, generated from the docstrings
Developer docs: CONTRIBUTING.md, ARCHITECTURE.md
The suite: docs/suite.md, with every bankstatementparser package
Project site: bankstatementparser.com
Versioning. Releases stay on the 0.0.x line and step by exactly 0.0.1, in lockstep with the rest of the bankstatementparser suite. Under SemVer a 0.0.x release may break anything; this project names each break in the CHANGELOG instead, as 0.0.36 does for the move to the standard's columns.
The breaking axis is the output: which lines produce a Transaction, the value and sign of each amount, and how each Transaction field is filled. Changing any of them for a file that loaded before is a breaking change and is called out in the CHANGELOG, even when no Python signature moves.
Output stability. The loader is deterministic: the same payload gives the same transactions in the same order.
Python API. load_cfonb, load_cfonb_file, summarize_cfonb, CfonbSummary and CfonbStatementParser keep their names and fields; names starting with _ are internal.
Minimum toolchain. Python 3.10 is the floor; it moves only in a release, for the whole suite at once, with the reason in the CHANGELOG (docs/POLICIES.md).
Dual-licensed under Apache License, Version 2.0 or MIT, at your option (SPDX-License-Identifier: Apache-2.0 OR MIT). Built on the core bankstatementparser library. Any contribution submitted for inclusion in the work shall be dual-licensed as above, without additional terms or conditions.
Author: Sebastien Rousseau
Both files in this release have provenance metadata.
Other/Proprietary License (Apache-2.0 OR MIT)
cfonb afb120 bank statement french-banking transactions
License Other/Proprietary License
Programming Language Python :: 3
Release files for bankstatementparser-loader-cfonb 0.0.36
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 42.7 kB
Release files / bankstatementparser_loader_cfonb-0.0.36.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Security for bankstatementparser-loader-cfonb 0.0.36
Both files in this release have been uploaded with provenance metadata.
With provenance bankstatementparser_loader_cfonb-0.0.36.tar.gz Nov 27, 2026
Attestation for bankstatementparser_loader_cfonb-0.0.36.tar.gz
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 27, 2026 2 release files Full provenance
Nov 26, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




