ofxstatement-lloyds
Plugin for ofxstatement to convert CSV statements exported from Lloyds Bank (UK) into OFX format for import into accounting software such as Odoo, GnuCash, and others.
Features
- Payee extraction
Parses Lloyds transaction descriptions to produce a clean payee name in the OFX <NAME> field. Downstream importers use this as the primary transaction label for display and auto-reconciliation.
- Transaction type preservation
Prefixes the OFX <MEMO> field with the original Lloyds transaction type code (DD, FPI, FPO, DEB, BGC etc.), preserving detail that is lost in the standard OFX TRNTYPE mapping.
- Structured memo
Splits the description into payee and remainder, so importers that display NAME : MEMO show useful detail rather than duplication.
- Balance tracking
Calculates opening and closing balances from the reverse-chronological CSV, included in the OFX output for statement validation.
Supported transaction patterns
- Card purchases
MERCHANT CD nnnn [ddMMMYY] extracts the merchant name.
- FX purchases
MERCHANT [ref] [CURRENCY] amount VISAXR rate CD nnnn extracts the merchant, with FX details in the memo.
- FX fees
NON-GBP TRANS FEE n.nn% CD nnnn normalised to Non-GBP Transaction Fee.
- Faster payments (FPI/FPO/BGC)
PAYEE reference sortcode ddMMMYY HH:MM extracts the payer or payee name.
- Direct debits and standing orders (DD/SO)
PAYEE mandate-reference extracts the payee name.
- Service charges (PAY)
SERVICE CHARGES REF : number extracts the charge description.
Unrecognised formats fall back to the full description as payee with the transaction type code as memo.
Installation
pip install ofxstatement-lloyds
Or with pipx:
pipx inject ofxstatement ofxstatement-lloyds
Configuration
Edit the ofxstatement configuration:
ofxstatement edit-config
Add a section for your Lloyds account:
[lloyds]
plugin = lloyds
currency = GBP
Usage
Export a CSV statement from Lloyds online banking, then convert:
ofxstatement convert -t lloyds statement.csv statement.ofx
The CSV is expected in the format provided by Lloyds online banking with columns: date, type, sort code, account number, description, debit, credit, balance.
Odoo reconciliation
The payee and memo split is designed to work with Odoo’s reconciliation models and the OCA account_statement_completion_label_simple module.
The Label field in Odoo matches against the OFX <NAME> (clean payee). The Note field matches against <MEMO> (prefixed with the Lloyds transaction type code).
Example reconciliation model rules:
Label Contains |
Note Contains |
Action |
|---|---|---|
Non-GBP |
Counterpart: bank charges expense account |
|
DIRECT LINE |
DD |
Partner: Direct Line Insurance |
FPI |
Filter: incoming faster payments only |
|
HMRC |
FPO |
Partner: HMRC |
Metadata
Release files for ofxstatement-lloyds 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ofxstatement_lloyds-1.1.2.tar.gz | 6.8 kB | Without provenance | Details for ofxstatement_lloyds-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ofxstatement_lloyds-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for ofxstatement_lloyds-1.1.2-py3-none-any.whl |
Total release size: 13.0 kB
Release files / ofxstatement_lloyds-1.1.2.tar.gz
| Download URL | ofxstatement_lloyds-1.1.2.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c522ee998a7f92f18993df47534ae23038cb6bf899c2736da57bd2b715f212db
|
|
BLAKE2b-256 checksum How to use checksums |
3f1544d6f704cd7d823ca6484788a82beea04f3ce1a362f6e09722075da91fac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / ofxstatement_lloyds-1.1.2-py3-none-any.whl
| Download URL | ofxstatement_lloyds-1.1.2-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f311cf11bc8a33238187f156302d80538165e1e2f5db76c7917ef279a192728d
|
|
BLAKE2b-256 checksum How to use checksums |
fca057b7abbad866b39595ce304d57a7614243f47887d6308f39621f76f40215
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for ofxstatement-lloyds 1.1.2
Provenance
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.