<!-- markdownlint-disable MD033 MD041 -->
<img
src="https://kura.pro/bankstatementparser/images/logos/bankstatementparser.webp"
alt="Logo of Bank Statement Parser"
width="261"
align="right" />
<!-- markdownlint-enable MD033 MD041 -->
# Bank Statement Parser: Automate Your Bank Statement Processing
![Bank Statement Parser banner][banner]
## The Bank Statement Parser is a Python library built for Finance and Treasury Professionals
[![PyPI][pypi-badge]][03] [![PyPI Downloads][pypi-downloads-badge]][07] [![License][license-badge]][01] [![Codecov][codecov-badge]][06]
## Overview
The Bank Statement Parser is an essential Python library for financial data management. Developed for the busy finance and treasury professional, it simplifies the task of parsing bank statements.
This tool simplifies the process of analysing CAMT and SEPA transaction files. Its streamlined design removes cumbersome manual data review and provides you with a concise, accurate report to facilitate further analysis.
Bank Statement Parser helps you save time by quickly and accurately processing data, allowing you to focus on your financial insights and decisions. Its reliable precision is powered by Python, making it the smarter, more efficient way to manage bank statements.
## Key Features
- **Versatile Parsing**: Easily handle formats like CAMT (ISO 20022) and beyond.
- **Financial Insights**: Unlock detailed analysis with powerful calculation utilities.
- **Simple CLI**: Automate and integrate with a straightforward command-line interface.
### Why Choose the Bank Statement Parser
- **Designed for Finance**: Tailored features for the finance sector's needs.
- **Efficiency at Heart**: Transform complex data tasks into simple ones.
- **Community First**: Built and enhanced by experts, for experts.
### Functionality
- **CamtParser**: Parse CAMT format files with ease.
- **Pain001Parser**: Handle SEPA PAIN.001 files effortlessly.
## Installation
### Create a Virtual Environment
We recommend creating a virtual environment to install the Bank Statement Parser. This will ensure that the package is installed in an isolated environment and will not affect other projects.
```bash
python3 -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```
### Getting Started
Install `bankstatementparser` with just one command:
```bash
pip install bankstatementparser
```
## Usage
### CAMT Files
```python
from bankstatementparser import CamtParser
# Initialize the parser with the CAMT file path
camt_parser = CamtParser('path/to/camt/file.xml')
# Parse the file and get the results
results = camt_parser.parse()
```
### PAIN.001 Files
```python
from bankstatementparser import Pain001Parser
# Initialize the parser with the PAIN.001 file path
pain_parser = Pain001Parser('path/to/pain/file.xml')
# Parse the file and get the results
results = pain_parser.parse()
```
## Command Line Interface (CLI) Guide
Leverage the CLI for quick parsing tasks:
### Basic Command
```bash
python cli.py --type <file_type> --input <input_file> [--output <output_file>]
```
- `--type`: Type of the bank statement file. Currently supported types are "camt" and "pain001".
- `--input`: Path to the bank statement file.
- `--output`: (Optional) Path to save the parsed data. If not provided, data is printed to the console.
### Examples for CAMT Files
1. Parse a CAMT file and print the results to the console:
```bash
python cli.py --type camt --input path/to/camt/camt_file.xml
```
Using the test data:
```bash
python ./bankstatementparser/cli.py --type camt --input ./tests/test_data/camt.053.001.02.xml
```
2. Parse a CAMT file and save the results to a CSV file:
```bash
python cli.py --type camt --input path/to/camt/file.xml --output path/to/output/file.csv
```
Using the test data:
```bash
python ./bankstatementparser/cli.py --type camt --input ./tests/test_data/camt.053.001.02.xml --output ./tests/test_data/camt_file.csv
```
### Examples for PAIN.001 Files
1. Parse a PAIN.001.001.03 file and print the results to the console:
```bash
python cli.py --type pain001 --input path/to/pain.001.001.03.xml
```
Using the test data:
```bash
python ./bankstatementparser/cli.py --type pain001 --input ./tests/test_data/pain.001.001.03.xml
```
2. Parse a PAIN.001.001.03 file and save the results to a CSV file:
```bash
python cli.py --type pain001 --input path/to/pain.001.001.03.xml --output path/to/output/file.csv
```
Using the test data:
```bash
python ./bankstatementparser/cli.py --type pain001 --input ./tests/test_data/pain.001.001.03.xml --output ./tests/test_data/pain_file.csv
```
## License
The project is licensed under the terms of both the MIT license and the
Apache License (Version 2.0).
- [Apache License, Version 2.0][01]
- [MIT license][02]
## Contribution
We welcome contributions to **bankstatementparser**. Please see the
[contributing instructions][04] for more information.
Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the
Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.
## Acknowledgements
We would like to extend a big thank you to all the awesome contributors
of [bankstatementparser][05] for their help and support.
This repo was inspired by [khorevkp/KK_Tools][08]'s innovative use of data
structures and algorithms, and was forked to build upon its foundation. Thank
you to [Konstantin Khorev][09]
[01]: https://opensource.org/license/apache-2-0/ "Apache License, Version 2.0"
[02]: http://opensource.org/licenses/MIT "MIT license"
[03]: https://github.com/sebastienrousseau/bankstatementparser "Bank Statement Parser on GitHub"
[04]: https://github.com/sebastienrousseau/bankstatementparser/blob/main/CONTRIBUTING.md "Contributing instructions"
[05]: https://github.com/sebastienrousseau/bankstatementparser/graphs/contributors "Contributors"
[06]: https://codecov.io/github/sebastienrousseau/bankstatementparser?branch=main "Codecov"
[07]: https://pypi.org/project/bankstatementparser/ "Bank Statement Parser on PyPI"
[08]: https://github.com/khorevkp/KK_Tools "KK_Tools on GitHub"
[09]: https://github.com/khorevkp "Konstantin Khorev on GitHub"
[banner]: https://kura.pro/bankstatementparser/images/titles/title-bankstatementparser.webp "Bank Statement Parser banner"
[codecov-badge]: https://img.shields.io/codecov/c/github/sebastienrousseau/pain001?style=for-the-badge&token=AaUxKfRiou 'Codecov badge'
[license-badge]: https://img.shields.io/pypi/l/pain001?style=for-the-badge 'License badge'
[pypi-badge]: https://img.shields.io/pypi/pyversions/pain001.svg?style=for-the-badge 'PyPI badge'
[pypi-downloads-badge]:https://img.shields.io/pypi/dm/pain001.svg?style=for-the-badge 'PyPI Downloads badge'
Raw data
{
"_id": null,
"home_page": "https://bankstatementparser.com",
"name": "bankstatementparser",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<3.13",
"maintainer_email": "",
"keywords": "banking,finance,parsing,CAMT,ISO20022,treasury,SEPA,analysis,transactions,reporting",
"author": "Sebastien Rousseau",
"author_email": "sebastian.rousseau@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f6/8d/a866ec3eab6ac8739bd3b95654849b7fa1d5aed11739fde74f098b3289fc/bankstatementparser-0.0.1.tar.gz",
"platform": null,
"description": "<!-- markdownlint-disable MD033 MD041 -->\n\n<img\n src=\"https://kura.pro/bankstatementparser/images/logos/bankstatementparser.webp\"\n alt=\"Logo of Bank Statement Parser\"\n width=\"261\"\n align=\"right\" />\n\n<!-- markdownlint-enable MD033 MD041 -->\n\n# Bank Statement Parser: Automate Your Bank Statement Processing\n\n![Bank Statement Parser banner][banner]\n\n## The Bank Statement Parser is a Python library built for Finance and Treasury Professionals\n\n[![PyPI][pypi-badge]][03] [![PyPI Downloads][pypi-downloads-badge]][07] [![License][license-badge]][01] [![Codecov][codecov-badge]][06]\n\n## Overview\n\nThe Bank Statement Parser is an essential Python library for financial data management. Developed for the busy finance and treasury professional, it simplifies the task of parsing bank statements.\n\nThis tool simplifies the process of analysing CAMT and SEPA transaction files. Its streamlined design removes cumbersome manual data review and provides you with a concise, accurate report to facilitate further analysis.\n\nBank Statement Parser helps you save time by quickly and accurately processing data, allowing you to focus on your financial insights and decisions. Its reliable precision is powered by Python, making it the smarter, more efficient way to manage bank statements.\n\n## Key Features\n\n- **Versatile Parsing**: Easily handle formats like CAMT (ISO 20022) and beyond.\n- **Financial Insights**: Unlock detailed analysis with powerful calculation utilities.\n- **Simple CLI**: Automate and integrate with a straightforward command-line interface.\n\n### Why Choose the Bank Statement Parser\n\n- **Designed for Finance**: Tailored features for the finance sector's needs.\n- **Efficiency at Heart**: Transform complex data tasks into simple ones.\n- **Community First**: Built and enhanced by experts, for experts.\n\n### Functionality\n\n- **CamtParser**: Parse CAMT format files with ease.\n- **Pain001Parser**: Handle SEPA PAIN.001 files effortlessly.\n\n## Installation\n\n### Create a Virtual Environment\n\nWe recommend creating a virtual environment to install the Bank Statement Parser. This will ensure that the package is installed in an isolated environment and will not affect other projects.\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate # On Windows use `venv\\Scripts\\activate`\n```\n\n### Getting Started\n\nInstall `bankstatementparser` with just one command:\n\n```bash\npip install bankstatementparser\n```\n\n## Usage\n\n### CAMT Files\n\n```python\nfrom bankstatementparser import CamtParser\n\n# Initialize the parser with the CAMT file path\ncamt_parser = CamtParser('path/to/camt/file.xml')\n\n# Parse the file and get the results\nresults = camt_parser.parse()\n```\n\n### PAIN.001 Files\n\n```python\nfrom bankstatementparser import Pain001Parser\n\n# Initialize the parser with the PAIN.001 file path\npain_parser = Pain001Parser('path/to/pain/file.xml')\n\n# Parse the file and get the results\nresults = pain_parser.parse()\n```\n\n## Command Line Interface (CLI) Guide\n\nLeverage the CLI for quick parsing tasks:\n\n### Basic Command\n\n```bash\npython cli.py --type <file_type> --input <input_file> [--output <output_file>]\n```\n\n- `--type`: Type of the bank statement file. Currently supported types are \"camt\" and \"pain001\".\n- `--input`: Path to the bank statement file.\n- `--output`: (Optional) Path to save the parsed data. If not provided, data is printed to the console.\n\n### Examples for CAMT Files\n\n1. Parse a CAMT file and print the results to the console:\n\n ```bash\n python cli.py --type camt --input path/to/camt/camt_file.xml\n ```\n\n Using the test data:\n\n ```bash\n python ./bankstatementparser/cli.py --type camt --input ./tests/test_data/camt.053.001.02.xml\n ```\n\n2. Parse a CAMT file and save the results to a CSV file:\n\n ```bash\n python cli.py --type camt --input path/to/camt/file.xml --output path/to/output/file.csv\n ```\n\n Using the test data:\n\n ```bash\n python ./bankstatementparser/cli.py --type camt --input ./tests/test_data/camt.053.001.02.xml --output ./tests/test_data/camt_file.csv\n ```\n\n### Examples for PAIN.001 Files\n\n1. Parse a PAIN.001.001.03 file and print the results to the console:\n\n```bash\npython cli.py --type pain001 --input path/to/pain.001.001.03.xml\n```\n\nUsing the test data:\n\n```bash\npython ./bankstatementparser/cli.py --type pain001 --input ./tests/test_data/pain.001.001.03.xml\n```\n\n2. Parse a PAIN.001.001.03 file and save the results to a CSV file:\n\n```bash\npython cli.py --type pain001 --input path/to/pain.001.001.03.xml --output path/to/output/file.csv\n```\n\nUsing the test data:\n\n```bash\npython ./bankstatementparser/cli.py --type pain001 --input ./tests/test_data/pain.001.001.03.xml --output ./tests/test_data/pain_file.csv\n```\n\n## License\n\nThe project is licensed under the terms of both the MIT license and the\nApache License (Version 2.0).\n\n- [Apache License, Version 2.0][01]\n- [MIT license][02]\n\n## Contribution\n\nWe welcome contributions to **bankstatementparser**. Please see the\n[contributing instructions][04] for more information.\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the\nApache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n\n## Acknowledgements\n\nWe would like to extend a big thank you to all the awesome contributors\nof [bankstatementparser][05] for their help and support.\n\nThis repo was inspired by [khorevkp/KK_Tools][08]'s innovative use of data\nstructures and algorithms, and was forked to build upon its foundation. Thank\nyou to [Konstantin Khorev][09]\n\n[01]: https://opensource.org/license/apache-2-0/ \"Apache License, Version 2.0\"\n[02]: http://opensource.org/licenses/MIT \"MIT license\"\n[03]: https://github.com/sebastienrousseau/bankstatementparser \"Bank Statement Parser on GitHub\"\n[04]: https://github.com/sebastienrousseau/bankstatementparser/blob/main/CONTRIBUTING.md \"Contributing instructions\"\n[05]: https://github.com/sebastienrousseau/bankstatementparser/graphs/contributors \"Contributors\"\n[06]: https://codecov.io/github/sebastienrousseau/bankstatementparser?branch=main \"Codecov\"\n[07]: https://pypi.org/project/bankstatementparser/ \"Bank Statement Parser on PyPI\"\n[08]: https://github.com/khorevkp/KK_Tools \"KK_Tools on GitHub\"\n[09]: https://github.com/khorevkp \"Konstantin Khorev on GitHub\"\n\n[banner]: https://kura.pro/bankstatementparser/images/titles/title-bankstatementparser.webp \"Bank Statement Parser banner\"\n[codecov-badge]: https://img.shields.io/codecov/c/github/sebastienrousseau/pain001?style=for-the-badge&token=AaUxKfRiou 'Codecov badge'\n[license-badge]: https://img.shields.io/pypi/l/pain001?style=for-the-badge 'License badge'\n[pypi-badge]: https://img.shields.io/pypi/pyversions/pain001.svg?style=for-the-badge 'PyPI badge'\n[pypi-downloads-badge]:https://img.shields.io/pypi/dm/pain001.svg?style=for-the-badge 'PyPI Downloads badge'\n",
"bugtrack_url": null,
"license": "Apache Software License",
"summary": "BankStatementParser is your essential tool for easy bank statement management.",
"version": "0.0.1",
"project_urls": {
"Documentation": "https://bankstatementparser.com/",
"Funding": "https://paypal.me/wwdseb",
"Homepage": "https://bankstatementparser.com",
"Source": "https://github.com/sebastienrousseau/bankstatementparser/releases"
},
"split_keywords": [
"banking",
"finance",
"parsing",
"camt",
"iso20022",
"treasury",
"sepa",
"analysis",
"transactions",
"reporting"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0ecc92c6c65294e49b77b01bb54708b4acf78dd0af598a34a8f4a1b2a47906d7",
"md5": "5a6a0aab7256f2b84526e7f9f1f9a459",
"sha256": "2c2c88ce07ce058824b2ab6afa30b2741d1db3354c9325c0b99bc1b511b98520"
},
"downloads": -1,
"filename": "bankstatementparser-0.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "5a6a0aab7256f2b84526e7f9f1f9a459",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.9,<3.13",
"size": 14912,
"upload_time": "2023-11-08T21:26:11",
"upload_time_iso_8601": "2023-11-08T21:26:11.541122Z",
"url": "https://files.pythonhosted.org/packages/0e/cc/92c6c65294e49b77b01bb54708b4acf78dd0af598a34a8f4a1b2a47906d7/bankstatementparser-0.0.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f68da866ec3eab6ac8739bd3b95654849b7fa1d5aed11739fde74f098b3289fc",
"md5": "7f0ebbd9bb1a06c33080f5db511c6249",
"sha256": "272cbea0c33a002aa15d9991d69de7d3713299515074dff57eedb368e4499af2"
},
"downloads": -1,
"filename": "bankstatementparser-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "7f0ebbd9bb1a06c33080f5db511c6249",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<3.13",
"size": 16926,
"upload_time": "2023-11-08T21:26:13",
"upload_time_iso_8601": "2023-11-08T21:26:13.251092Z",
"url": "https://files.pythonhosted.org/packages/f6/8d/a866ec3eab6ac8739bd3b95654849b7fa1d5aed11739fde74f098b3289fc/bankstatementparser-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-08 21:26:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sebastienrousseau",
"github_project": "bankstatementparser",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "bankstatementparser"
}