bankline-direct-parser

Parser for Bankline Direct banking information services


License
MIT
Install
pip install bankline-direct-parser==0.3

Documentation

Bankline Direct Parser

Python module for parsing Natwest/RBS Bankline Direct Data Services files.

Requirements

Only python 3.4+ supported.

Installation

pip install git+https://github.com/ministryofjustice/bankline-direct-parser.git

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