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
- Github repository: https://github.com/ODAncona/pycamt/
- Documentation https://ODAncona.github.io/pycamt/
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.
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 Camt053Parser 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 Specify your chosen license here, providing users with information on how they can use, modify, and share your code.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pycamt-1.0.1.tar.gz
.
File metadata
- Download URL: pycamt-1.0.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1016-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af2a01096fe4a3adfddeb6fef5bcd8e52c40eaf87036390feaab4417612aabca |
|
MD5 | 1ea734df96b0d94b2afdd19e35a93efa |
|
BLAKE2b-256 | a1c554017fa9587cda43812284a51baf8c91ee9d54dcda2097ff4a080e5cb001 |
File details
Details for the file pycamt-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: pycamt-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1016-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68fada177c782c318ea9d67f3a6b40b6d1fdc0cdecd193d9b376f42ec5d72da4 |
|
MD5 | 20d02c6cd1e856bfd7edc39ceb092ef5 |
|
BLAKE2b-256 | 3cf571b75e32f3820e332c5e89760d2386d4d8fbc826c3f8f7123de9d3021ce9 |