A module to parse MT940 files
Project description
mt940 is a parser for MT940 files.
Nutshell
Import:
>>> import os >>> from mt940 import MT940
Instanciate:
>>> mt940 = MT940('mt940/MT940.txt')
The statements:
>>> len(mt940.statements) 1 >>> statement, = mt940.statements >>> statement.account '123456789' >>> statement.information '13501/1' >>> start_balance = statement.start_balance >>> start_balance.date datetime.date(2012, 5, 11) >>> start_balance.amount Decimal('5138.61') >>> start_balance.currency 'EUR' >>> end_balance = statement.end_balance >>> end_balance.date datetime.date(2012, 5, 14) >>> end_balance.amount Decimal('5638.62') >>> end_balance.currency 'EUR'
The transactions:
>>> len(statement.transactions) 3 >>> transaction, _, _ = statement.transactions >>> transaction.date datetime.date(2012, 5, 12) >>> transaction.booking datetime.date(2012, 5, 14) >>> transaction.amount Decimal('500.01') >>> transaction.id 'N654' >>> transaction.reference 'NONREF' >>> transaction.additional_data '987654321' >>> transaction.description # doctest: +NORMALIZE_WHITESPACE '/TRTP/SEPA OVERBOEKING/IBAN/FR12345678901234/BIC/GEFRADAM\n/NAME/QASD JGRED/REMI/Dit zijn de omschrijvingsregels/EREF/NOTPRO\nVIDED'
To report issues please visit the mt940 bugtracker.
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
mt940-0.4.tar.gz
(7.9 kB
view details)
Built Distributions
mt940-0.4-py3-none-any.whl
(10.0 kB
view details)
mt940-0.4-py2-none-any.whl
(10.0 kB
view details)
File details
Details for the file mt940-0.4.tar.gz
.
File metadata
- Download URL: mt940-0.4.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f777d809955b9845f5e7ae7ff85c7c2c600a50e413484f1787e32bfdadc41b94 |
|
MD5 | 31d8b0136d9f4891c91e3af0f4eb9002 |
|
BLAKE2b-256 | eaaba66a9e8422901f8bdd227f34a9d6ecd49ab81dd3defe1080e18204762df8 |
File details
Details for the file mt940-0.4-py3-none-any.whl
.
File metadata
- Download URL: mt940-0.4-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c7857bdbaa1791cd0bf68ce5c144bd5182aed3b855edb8a4af0bf3c0d0e130e |
|
MD5 | dc965766e82977f1255bd00f8e7e528d |
|
BLAKE2b-256 | 690bbbef9edeecd26de09e0f6ebd8747214c37c29ec8872e9cfcb45d64da84a4 |
File details
Details for the file mt940-0.4-py2-none-any.whl
.
File metadata
- Download URL: mt940-0.4-py2-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb4a83a2cbf73e9e90425e7cc81c3e3b1ad4767a24f53a52ee018a66ce93e9af |
|
MD5 | 393025ee2d3df750f42af0a0fecd6a0a |
|
BLAKE2b-256 | 97d3be175df4a12eed129a4e81c0293a56c5496213bf67b3356ac1b096047139 |