Skip to main content

Python library to create bank statements in the MT940 format.

Only tested on Python 3.10+, but should work on 3.7+.

pip install mt940-writer

Development

https://github.com/ministryofjustice/mt940-writer/actions/workflows/test.yml/badge.svg?branch=main

Please report bugs and open pull requests on GitHub.

To work on changes to this library, it’s recommended to install it in editable mode into a virtual environment, i.e. pip install --editable .

Use python -m tests to run all tests locally. Alternatively, you can use tox if you have multiple python versions.

[Only for GitHub team members] Distribute a new version to PyPI by:

  • updating the VERSION tuple in mt940_writer.py

  • adding a note to the History

  • publishing a release on GitHub which triggers an upload to PyPI; alternatively, run python -m build; twine upload dist/* locally

History

0.8

Testing on python 3.10 to 3.14. Reverted to flake8 for code style to be consistent with other MoJ libs. Improve linting and modernise code style. Migrated to trusted publishing.

0.7

Added additional transaction information with tag 86. Switched to ruff for code linting and formatting. Migrated test, build and release processes away from deprecated setuptools commands.

0.6

Maintenance release, no library changes.

0.2 - 0.5

No significant library changes, other than support for newer versions of python.

0.1

Original release.

Metadata

Release files for mt940-writer 0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mt940-writer 0.8
File Size Uploaded Provenance Actions
mt940_writer-0.8.tar.gz 4.9 kB With provenance Details for mt940_writer-0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mt940-writer 0.8
File Interpreter ABI Platform Actions
mt940_writer-0.8-py3-none-any.whl Python 3 none any Details for mt940_writer-0.8-py3-none-any.whl

Total release size: 9.2 kB

Release files / mt940_writer-0.8.tar.gz

Download URL mt940_writer-0.8.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d6e68e1277fe827073660bd4618d03b48e90d061c54120a4c534c0d986f83997
BLAKE2b-256 checksum
How to use checksums
efb0b0fcb333889c2b649f6f154b91b6aee41eb6c696bfd5bddc45e1a28467f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

Release files / mt940_writer-0.8-py3-none-any.whl

Download URL mt940_writer-0.8-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ac1ac34fa90e271d4802195f67ea958dd2fdd127179523340b2d93b979cb488
BLAKE2b-256 checksum
How to use checksums
de02a96cb081400d2c2dd1a39f07dea0398826c520e68ee32a6bf5a63aeb1ce7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

Security for mt940-writer 0.8

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mt940_writer-0.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page