Skip to content

Commit d065c9e

Browse files
Merge pull request #28 from sebastienrousseau/feat/pain001
feat(pain001): v0.0.16
2 parents 9b73d13 + 1980f2a commit d065c9e

File tree

18 files changed

+277
-116
lines changed

18 files changed

+277
-116
lines changed

TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<!-- markdownlint-enable MD033 MD041 -->
1212

13-
# Pain001 (v0.0.15)
13+
# Pain001 (v0.0.16)
1414

1515
![Pain001 banner][banner]
1616

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
# Front Matter (YAML).
3+
## name - The name of the site. (max 64 characters)
4+
name: pain.001.001.03
5+
## title - The title of the page. (max 64 characters)
6+
title: Customer Credit Transfer Initiation V3 (pain.001.001.03)
7+
---
8+
9+
# Customer Credit Transfer Initiation V3 (pain.001.001.03)
10+
11+
## Overview
12+
13+
The Customer Credit Transfer Initiation V3 (`pain.001.001.03`) is an
14+
XML-based message format under the ISO 20022 standard, designed to
15+
streamline cross-border and domestic payment processes. With the
16+
increasing demand for efficient, secure, and standardized payment
17+
methods, financial institutions and their customers face challenges
18+
related to the complexity, speed, and cost of executing credit transfers.
19+
20+
## Features/Benefits
21+
22+
- **Standardized Format:** The pain.001.001.03 message format provides a consistent structure for initiating credit transfers, making it easier for financial institutions to process and manage transactions.
23+
- **Increased Efficiency:** By adopting the pain.001.001.03 format, financial institutions can automate and streamline the credit transfer initiation process, reducing manual intervention and errors.
24+
- **Enhanced Remittance Data:** The format allows for more extensive remittance information, providing clearer transaction details for both sender and receiver.
25+
- **Improved Compliance:** The standardized message structure helps organizations meet regulatory requirements and reduces the risk of non-compliance penalties.
26+
- **Interoperability:** The pain.001.001.03 format is compatible with other ISO 20022 messages, facilitating seamless communication between different financial institutions and systems.
27+
28+
## Market Opportunity
29+
30+
The adoption of `pain.001.001.03` presents a significant market
31+
opportunity for financial institutions.
32+
33+
By implementing this message format, organizations can:
34+
35+
- Enhance customer experience by offering faster and more transparent transactions
36+
- Improve operational efficiency and reduce costs associated with manual processing
37+
- Position themselves as industry leaders in adopting global standards for payment processing
38+
- Leverage the ISO 20022 standard to explore new business opportunities and partnerships
39+
- Ensure compliance with evolving regulatory requirements and stay ahead of the competition
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
# Front Matter (YAML).
3+
## name - The name of the site. (max 64 characters)
4+
name: pain.001.001.09
5+
## title - The title of the page. (max 64 characters)
6+
title: Customer Credit Transfer Initiation V9 (pain.001.001.09)
7+
---
8+
9+
10+
# Customer Credit Transfer Initiation V9 (pain.001.001.09)
11+
12+
## Overview
13+
14+
The Customer Credit Transfer Initiation V9 (`pain.001.001.09`) is an XML
15+
-based message format under the ISO 20022 standard, designed to
16+
streamline cross-border and domestic payment processes. It is the
17+
successor to the Customer Credit Transfer Initiation V3 (`pain.001.001.
18+
03`) message format, and includes a number of enhancements that improve
19+
the efficiency, security, and flexibility of payment processing.
20+
21+
## Features/Benefits
22+
23+
The `pain.001.001.09` message format offers a number of features and
24+
benefits over the previous version, including:
25+
26+
- **Enhanced data richness**: The format includes additional data
27+
elements that provide more detailed information about the payment,
28+
such as the purpose of the payment, the tax identification numbers of
29+
the sender and receiver, and the reason for the payment.
30+
- **Improved flexibility**: The format allows for more flexible payment
31+
instructions, such as the ability to specify multiple payment
32+
beneficiaries and the ability to split payments between multiple
33+
accounts.
34+
- **Increased security**: The format includes a number of security
35+
features that help to protect payments from fraud and errors, such as
36+
digital signatures and encryption.
37+
- **Improved interoperability**: The format is compatible with other
38+
ISO 20022 messages, which facilitates seamless communication between
39+
different financial institutions and systems.
40+
41+
## Market Opportunity
42+
43+
The adoption of `pain.001.001.09` presents a significant market
44+
opportunity for financial institutions. By implementing this message
45+
format, organizations can:
46+
47+
- Enhance customer experience by offering faster and more transparent payments
48+
- Improve operational efficiency and reduce costs associated with manual processing
49+
- Position themselves as industry leaders in adopting global standards for payment processing
50+
- Leverage the ISO 20022 standard to explore new business opportunities and partnerships
51+
- Ensure compliance with evolving regulatory requirements and stay ahead of the competition

pain001/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515

1616
"""The Python pain001 module."""
1717
__all__ = ["pain001"]
18-
__version__ = "0.0.15"
18+
__version__ = "0.0.16"

pain001/__main__.py

+53-33
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,60 @@
3333

3434

3535
cli_string = """
36+
Pain001 is a Python Library for Automating ISO 20022-Compliant Payment Files
37+
Using CSV Data.
3638
37-
usage:
38-
python3 -m pain001 <xml_message_type><xml_file_path> <xsd_file_path>
39-
<csv_file_path>
40-
41-
Python Pain001 is a Python package that generates a Customer-to-Bank
42-
Credit Transfer payload in the pain.001.001.03 format from a CSV file.
43-
The package is named after the standard file format for SEPA and
44-
non-SEPA Credit Transfer, which is the Pain (payment initiation)
45-
format 001.001.03. The Pain001 library provides a convenient way for
46-
developers to create payment files in this format and to validate
47-
the generated files against the XSD schema.
39+
It offers a streamlined solution for reducing complexity and costs associated
40+
with payment processing. By providing a simple and efficient method to create
41+
ISO 20022-compliant payment files, it eliminates the manual effort of file
42+
creation and validation. This not only saves valuable time and resources but
43+
also minimizes the risk of errors, ensuring accurate and seamless payment
44+
processing.
4845
4946
Usage:
50-
python3 -m pain001 <xml_message_type> <xml_file_path> <xsd_file_path>
51-
<csv_file_path>
52-
53-
The first argument is the path of the XML template file. The second
54-
argument is the path of the XSD template file. The third argument is
55-
the path of the CSV file containing the payment data."""
47+
python3 -m pain001 \
48+
<xml_message_type> \
49+
<xml_file_path> \
50+
<xsd_file_path> \
51+
<csv_file_path>
52+
53+
Arguments:
54+
xml_message_type: The type of XML message. Valid values are:
55+
- pain.001.001.03
56+
- pain.001.001.09
57+
xml_file_path: The path to the XML template file.
58+
xsd_file_path: The path to the XSD template file.
59+
csv_file_path: The path to the CSV data file.
60+
61+
Example:
62+
python3 -m pain001 "pain.001.001.09" \
63+
./templates/pain.001.001.09/template.xml \
64+
./templates/pain.001.001.09/pain.001.001.09.xsd \
65+
./templates/pain.001.001.09/template.csv
66+
67+
This command will generate a pain.001.001.09 XML file using the template
68+
files in the ./templates/pain.001.001.09/ directory and the CSV data in
69+
./templates/pain.001.001.09/template.csv.
70+
71+
The generated XML file will be saved in the <xml_message_type> directory.
72+
For example, if the <xml_message_type> is pain.001.001.09, the generated
73+
XML file will be saved in the directory pain.001.001.09 and the file name
74+
will be pain.001.001.09.xml.
75+
76+
Note: The generated XML file will be validated against the XSD template
77+
file before being saved. If the validation fails, the program will exit
78+
with an error message.
79+
80+
For more information, please visit
81+
https://github.com/sebastienrousseau/pain001
82+
"""
5683

5784

5885
def main(
5986
xml_message_type=None,
6087
xml_file_path=None,
6188
xsd_file_path=None,
62-
csv_file_path=None
89+
csv_file_path=None,
6390
):
6491
"""
6592
Entrypoint for pain001 when invoked as a module with
@@ -71,28 +98,24 @@ def main(
7198
logger = context.Context.get_instance().get_logger()
7299

73100
if (
74-
xml_file_path is None or
75-
xsd_file_path is None or
76-
csv_file_path is None
101+
xml_file_path is None
102+
or xsd_file_path is None
103+
or csv_file_path is None
77104
):
78105
parser = argparse.ArgumentParser(
79106
description="Generate Pain.001 file from CSV data"
80107
)
81108
parser.add_argument(
82-
"xml_message_type",
83-
help="Type of XML message"
109+
"xml_message_type", help="Type of XML message"
84110
)
85111
parser.add_argument(
86-
"xml_file_path",
87-
help="Path to XML template file"
112+
"xml_file_path", help="Path to XML template file"
88113
)
89114
parser.add_argument(
90-
"xsd_file_path",
91-
help="Path to XSD template file"
115+
"xsd_file_path", help="Path to XSD template file"
92116
)
93117
parser.add_argument(
94-
"csv_file_path",
95-
help="Path to CSV data file"
118+
"csv_file_path", help="Path to CSV data file"
96119
)
97120
args = parser.parse_args()
98121

@@ -132,10 +155,7 @@ def main(
132155
sys.exit(1)
133156

134157
process_files(
135-
xml_message_type,
136-
xml_file_path,
137-
xsd_file_path,
138-
csv_file_path
158+
xml_message_type, xml_file_path, xsd_file_path, csv_file_path
139159
)
140160

141161

0 commit comments

Comments
 (0)