libmt94x
MT940/MT942 is a text based data file format used in bank account statements (commonly used by banks in the Netherlands). A bank account statement contains your account balance as well as a listing of all the transactions between a given start date and end date.
This library provides an API to define and serialize MT940/MT942 documents in Python. It does not provide a parser.
Installation
Install using pip:
$ pip install python-libmt94x
Usage
Creating MT940 documents
libmt94x implements two ING-defined dialects of MT940:
Mijn ING Zakelijk (dubbed ming),
Inside Business Payments (dubbed ibp).
No matter which dialect your are using you first need to construct an MT940Document and then use the appropriate method to write it out to the target dialect:
from libmt94x.document import Mt940Document
from libmt94x.fields import AccountIdentification
# ...snip...
from libmt94x.fields import TransactionReferenceNumber
from libmt94x.serializer import Mt94xSerializer
from libmt94x.writer import Mt94xWriter
serializer = Mt94xSerializer()
writer = Mt94xWriter(serializer)
doc = Mt940Document(
transaction_reference_number=TransactionReferenceNumber('P140220000000001'),
account_identification=AccountIdentification('NL69INGB0123456789', 'EUR'),
# ...snip...
)
# to write using the ``ming`` dialect
bytestring = writer.write_document_ming(doc)
# to write using the ``ibp`` dialect
bytestring = writer.write_document_ibp(doc)
How to find more info
For more details on the API and compatibility issues see docs/design.rst.
For example MT940 documents see tests/examples/.
For fully fledged code examples see the tests in tests/test_writer_doc_XXX.py.
Developing on libmt94x
Running tests
It is recommended that you use a virtualenv when working on libmt94x. To run tests you will first need to install the development dependencies, which include tox:
$ pip install -r dev-requirements.txt
Now run the tests using tox (this will invoke py.test inside the tox-managed virtual test environment):
$ tox
This will run tests, collect test coverage and run the style checker flake8. For a more lightweight test run you can run pytest directly:
$ py.test
Contributing
Please see CONTRIBUTING.rst for guidelines on how to contribute to libmt94x.
Changelog
0.3.4 (2016-07-11)
Updating package metadata (no code changes). [numerodix]
0.3.3 (2016-07-11)
First release to PyPI. [numerodix]
0.3.2 (2016-06-27)
Add README.txt and HISTORY.rst to setup.py long_description for display on ginger devpi. [numerodix]
0.3.1 (2016-05-13)
Use standard packaging and testing conventions in this package. [numerodix]
Metadata
Release files for python-libmt94x 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-libmt94x-0.3.4.tar.gz | 23.6 kB | Without provenance | Details for python-libmt94x-0.3.4.tar.gz |
Release files / python-libmt94x-0.3.4.tar.gz
| Download URL | python-libmt94x-0.3.4.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
396dcb2ba7f53419d45c402ad3255d7cd31a1e67ce995716e0d2a2705c547100
|
|
BLAKE2b-256 checksum How to use checksums |
f897ff3c0365d93c390b35ae700bf5ce6af3e217c42be482a0d4f103cee5a13f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for python-libmt94x 0.3.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.