Python module for parsing Natwest/RBS Bankline Direct Data Services files.
Requirements
Only tested on Python 3.10+, but should work on 3.7+.
Installation
pip install bankline-direct-parser
Usage
from bankline_parser.data_services import parse
# from file
with open(filename) as f:
parsed = parse(f)
if parsed.is_valid():
print(parsed.accounts[0].records[0].transaction_code)
else:
print(parsed.errors)
# from list of rows
parsed = parse(lines)
Model Layout
DataServicesFile
VolumeHeaderLabel
[Account]
FileHeaderLabel
UserHeaderLabel
[DataRecord|BalanceRecord]
UserTrailerLabel
Development
Please report bugs and open pull requests on GitHub.
To work on changes to this library, it’s recommended to install it in editable mode into a virtual environment, i.e. pip install --editable .
Use python -m tests to run all tests locally. Alternatively, you can use tox if you have multiple python versions.
[Only for GitHub team members] Distribute a new version to PyPI by:
updating the VERSION tuple in bankline_parser/__init__.py
adding a note to the History
publishing a release on GitHub which triggers an upload to PyPI; alternatively, run python -m build; twine upload dist/* locally
History
- 0.9
Testing on python 3.10 to 3.14. Improve linting and modernise code style. Migrated to trusted publishing.
- 0.8
Migrated test, build and release processes away from deprecated setuptools commands. No significant library changes.
- 0.7
Maintenance release, no library changes.
- 0.2 - 0.6
No significant library changes, other than support for newer versions of python.
- 0.1
Original release.
Copyright
Copyright (C) 2025 HM Government (Ministry of Justice Digital & Technology). See LICENSE.txt for further details.
Release files for bankline-direct-parser 0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bankline_direct_parser-0.9.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bankline_direct_parser-0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.0 kB
Release files / bankline_direct_parser-0.9.tar.gz
| Download URL | bankline_direct_parser-0.9.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6588de8f5339939f7fd866b01728c74571a15c1223d92c67a64c1103c71c720
|
|
BLAKE2b-256 checksum How to use checksums |
25bd81d64ea086ba706e541f8b042ec7cd00e51e900101bb581e79408cb9a40b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.
Transparency logRelease files / bankline_direct_parser-0.9-py3-none-any.whl
| Download URL | bankline_direct_parser-0.9-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2aa2071f19d3cf910f7e432bfa4f33f7b4212c41bc6c9f8921b47caf1704976c
|
|
BLAKE2b-256 checksum How to use checksums |
212c3c65f83b7063f6fa20d1170ad0247648c4f4e13fffd8c554969b7465380a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.
Transparency log