Skip to main content

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)
2
>>> statement = mt940.statements[0]
>>> statement.account
u'123456789'
>>> statement.information
u'13501/1'
>>> start_balance = statement.start_balance
>>> start_balance.date
datetime.date(2012, 5, 11)
>>> start_balance.amount
Decimal('5138.61')
>>> start_balance.currency
u'EUR'
>>> end_balance = statement.end_balance
>>> end_balance.date
datetime.date(2012, 5, 14)
>>> end_balance.amount
Decimal('5638.62')
>>> end_balance.currency
u'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
u'N654'
>>> transaction.reference
u'NONREF'
>>> transaction.additional_data
u'987654321'
>>> transaction.description # doctest: +NORMALIZE_WHITESPACE
u'/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.

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.5.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distributions

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

mt940-0.5.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

mt940-0.5.0-py2-none-any.whl (9.3 kB view details)

Uploaded Python 2

File details

Details for the file mt940-0.5.0.tar.gz.

File metadata

  • Download URL: mt940-0.5.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.10

File hashes

Hashes for mt940-0.5.0.tar.gz
Algorithm Hash digest
SHA256 3432e03316fc3fa1293e2131e7389c8f4d7f0a58e7271d567b1f4f0e4d5b52f5
MD5 70a7d61f55b3ec1d13baf4701b751010
BLAKE2b-256 401da823a98ff65da25043b8778362940a150f2566060b6a89cf26cee4417aa1

See more details on using hashes here.

File details

Details for the file mt940-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: mt940-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.10

File hashes

Hashes for mt940-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18c650edadd8b56c233bacbc42f1125a71dbded59987b366a86637fa2ceed602
MD5 22205c47b9f86013a5780ae4b8ac7894
BLAKE2b-256 bffd7fb7b4668d63f9bf93676b8a6bf18467bdf5295cdcada73e860d549bc193

See more details on using hashes here.

File details

Details for the file mt940-0.5.0-py2-none-any.whl.

File metadata

  • Download URL: mt940-0.5.0-py2-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.10

File hashes

Hashes for mt940-0.5.0-py2-none-any.whl
Algorithm Hash digest
SHA256 b2577d77fd08177e951bb12aa0903ff029f51664dbc8f663cbc7acbfe9066b2a
MD5 2053e32f79ce3aec09cda00e82b2fe45
BLAKE2b-256 0db9fd3afa19f4b9f1a7d48c63f18940f11b3206c41ab172128c5dd81e83110b

See more details on using hashes here.

Supported by

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