--- id: mt-940 version: "5.0.0" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # mt-940 — A library to parse MT940 files and returns smart Python collections for statistics and manipulation. License: permissive · Maintenance: active · Downloads: 696.1K/mo ## What it is and what it does This is a parser for MT940 bank statement files—a SWIFT standard format used by banks worldwide to exchange transaction data. It reads these files and returns fully typed Python collections where transactions, amounts, balances, and dates are rich objects rather than raw strings, making them immediately usable for aggregation, filtering, and analysis. The library has no runtime dependencies and includes type information (py.typed), so it works cleanly in typed codebases. It handles quirks from many real banks through a combination of sensible defaults and opt-in extensions: you can parse a standard statement with a single call, but for banks with non-standard tag layouts, you can register custom tag handlers. It also supports multiple statements in one file, JSON serialization, and custom transaction grouping rules. Use it for: - Extract and reconcile bank transactions from MT940 files into a Python application for accounting or bookkeeping. - Aggregate statement-level data like opening and closing balances across multiple bank files for financial reporting. - Serialize parsed statements to JSON for downstream processing, APIs, or storage in a data pipeline. - Handle bank-specific MT940 variants by registering opt-in tags without forking the parser. - Build transaction analysis tools that work with typed amount and date objects instead of parsing strings manually. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses MT940 bank statement files into fully typed Python collections with smart models for amounts, balances, and dates, supporting multiple banks and real-world format quirks. Yes. Actively maintained, zero runtime dependencies, ships with full type information, and handles a wide range of real-world bank formats. Suitable for any Python project that needs to parse MT940 statements reliably. No known security issues, permissive license, and low install friction make it a straightforward choice. ## Install pip install mt-940 uv add mt-940 poetry add mt-940 ## Installing mt-940 Before you install: Low friction: pure Python with zero runtime dependencies, ships as a wheel, and actively maintained with a recent release 53 days ago. License in practice: BSD-3-Clause is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install mt-940 import mt940 transactions = mt940.parse('statement.sta') for transaction in transactions: print(transaction.data['date'], transaction.data['amount']) Requires Python 3.10 or newer. Verify before relying: - Whether the package handles all real-world bank statement variations without manual intervention beyond opt-in tags. - Performance characteristics when parsing large statement files or many statements in sequence. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 696.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags MT940 bank statement parser, parse bank statements Python, MT940 file reader, bank transaction parsing, SWIFT statement processing, financial data extraction, bank file format parser, banking, file-parsing, financial-data [View on SkillFed](https://skillfed.io/packages/mt-940) · [View on PyPI](https://pypi.org/project/mt-940/)