Skip to main content

Camt053Parser is a flexible and extensible Python class designed to parse CAMT.053 XML files, which are used for bank-to-customer account report messages in the financial industry. The parser supports multiple versions of the CAMT.053 standard, making it a versatile tool for extracting financial transaction data.

Project description

Pycamt

Release Build status codecov Commit activity License

Overview

Pycamt is a flexible and extensible Python class designed to parse CAMT.053 XML files, which are used for bank-to-customer account report messages in the financial industry. The parser supports multiple versions of the CAMT.053 standard, making it a versatile tool for extracting financial transaction data.

https://docs.findock.com/processing-camt-053-files#:~:text=The%20camt.,structured%20MT%20940%20bank%20file.

Installation

To use Camt053Parser, simply copy the Camt053Parser.py file into your project directory, or include it as part of your Python package.

pip install pycamt

Usage

Creating an Instance

You can create an instance of the Camt053Parser by providing the XML data as a string:

from pycamt.parser import Camt053Parser

xml_data = "<Document>...</Document>"  # Your CAMT.053 XML data as a string
parser = Camt053Parser(xml_data)

Alternatively, you can initialize the parser with a file path:

parser = Camt053Parser.from_file('path/to/your/file.xml')

Extracting Group Header Information

To extract group header information such as message ID and creation date/time:

group_header = parser.get_group_header()
print(group_header)

Extracting Transactions

To retrieve all transaction entries from the file:

transactions = parser.get_transactions()
for transaction in transactions:
    print(transaction)

Extracting Statement Information

To get basic statement information like IBAN and opening/closing balance:

statement_info = parser.get_statement_info()
print(statement_info)

Contributing

Contributions to Camt053Parser are welcome! If you have suggestions for improvements or encounter any issues, please feel free to open an issue or submit a pull request.

Guidelines

For submitting enhancements or new features, please ensure your code is well-documented and includes relevant docstrings. Ensure your contributions are tested to maintain reliability and stability of the parser. Adhere to the existing code style for consistency.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycamt-1.1.0.tar.gz (124.9 kB view details)

Uploaded Source

Built Distribution

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

pycamt-1.1.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file pycamt-1.1.0.tar.gz.

File metadata

  • Download URL: pycamt-1.1.0.tar.gz
  • Upload date:
  • Size: 124.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pycamt-1.1.0.tar.gz
Algorithm Hash digest
SHA256 83a1e5f12a0b5cc70cc9d84b54fc4a468ced723c3a1791e2546e3fd6c92eb80a
MD5 29db12433701edcb8627cd87e63e1a9a
BLAKE2b-256 30e7a375b2324021d0182a5c94ff48f7458e7fc7e83bc27027de6a7021f5b10c

See more details on using hashes here.

File details

Details for the file pycamt-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pycamt-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pycamt-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 601ba15ab207754a5e9ad7f1e1ff358e7340858145b7858cffd9972f220ebe17
MD5 2fe7f987d490a75370bb4aa515c71c04
BLAKE2b-256 9f5df34053357bdc6244d5abf846a763b9e8e3c3060e988f7e01d1e8c58efd61

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 Pingdom Monitoring Sentry Error logging StatusPage Status page