Skip to main content

Parser for Bankline Direct banking information services

Project description

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

https://github.com/ministryofjustice/bankline-direct-parser/actions/workflows/test.yml/badge.svg?branch=main

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bankline_direct_parser-0.9.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bankline_direct_parser-0.9-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file bankline_direct_parser-0.9.tar.gz.

File metadata

  • Download URL: bankline_direct_parser-0.9.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bankline_direct_parser-0.9.tar.gz
Algorithm Hash digest
SHA256 a6588de8f5339939f7fd866b01728c74571a15c1223d92c67a64c1103c71c720
MD5 c38898a7beb96b235484c962d2494a7e
BLAKE2b-256 25bd81d64ea086ba706e541f8b042ec7cd00e51e900101bb581e79408cb9a40b

See more details on using hashes here.

Provenance

The following attestation bundles were made for bankline_direct_parser-0.9.tar.gz:

Publisher: release.yml on ministryofjustice/bankline-direct-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bankline_direct_parser-0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for bankline_direct_parser-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2aa2071f19d3cf910f7e432bfa4f33f7b4212c41bc6c9f8921b47caf1704976c
MD5 fa645b4f4ea5efff83016ca975571227
BLAKE2b-256 212c3c65f83b7063f6fa20d1170ad0247648c4f4e13fffd8c554969b7465380a

See more details on using hashes here.

Provenance

The following attestation bundles were made for bankline_direct_parser-0.9-py3-none-any.whl:

Publisher: release.yml on ministryofjustice/bankline-direct-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page