Giter Site home page Giter Site logo

norma43parser's Introduction

Norma 43 Parser

Build status Code style: black Checked with mypy

Parser for Norma43 bank account documents, commonly used in spanish banks to retrieve account movements. It supports Python 3.6 onwards.

How to install

$ pip install norma43parser

How to use it

from norma43parser import Norma43Parser, DateFormat                                                                                                                                                                                            

parser = Norma43Parser(DateFormat.SPANISH)
# it reads dates in DMY format, for YMD use DateFormat.ENGLISH

contents = open('./file.n43','r').read()                                                                                                                                                                           

n43 = parser.parse(contents)

Norma43Document Model

Class Norma43Document:

  • accounts: List of Account objects.
  • reported_entries: number of reported n43 file entries.

Class Account:

  • header: a Header object.
  • movement_lines: List ofr MovementLine objects
  • footer: a Footer object.

Class Header:

  • bank_code: string.
  • branch_code: string.
  • account_number: string.
  • start_date: date.
  • end_date: date.
  • initial_balance: Decimal.
  • currency: string in ISO-4217 (number).
  • information_mode_code: string.
  • account_name: string.

Class MovementLine:

  • branch_code: string.
  • transaction_date: date.
  • value_date: date.
  • amount: Decimal.
  • balance: Decimal.
  • description: string.
  • extra_information: List of strings.

Class Footer:

  • bank_code: string.
  • branch_code: string.
  • account_number: string.
  • debit_entries: integer.
  • debit_amount: Decimal.
  • credit_entries: integer.
  • credit_amount: Decimal.
  • final_balance: Decimal.
  • currency: string in ISO-4217 (number).

norma43parser's People

Contributors

sergief avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.