Python SEPA XML implementations
Project description
This is a python implementation to generate SEPA XML files.
Limitations
Supported standards:
SEPA PAIN.001.001.03
SEPA PAIN.008.001.02
SEPA PAIN.008.002.02
SEPA PAIN.008.003.02
Usage
Direct debit
Example:
from sepaxml import SepaDD
import datetime, uuid
config = {
"name": "Test von Testenstein",
"IBAN": "NL50BANK1234567890",
"BIC": "BANKNL2A",
"batch": True,
"creditor_id": "DE26ZZZ00000000000", # supplied by your bank or financial authority
"currency": "EUR", # ISO 4217
# "instrument": "B2B" # - default is CORE (B2C)
}
sepa = SepaDD(config, schema="pain.008.002.02", clean=True)
payment = {
"name": "Test von Testenstein",
"IBAN": "NL50BANK1234567890",
"BIC": "BANKNL2A",
"amount": 5000, # in cents
"type": "RCUR", # FRST,RCUR,OOFF,FNAL
"collection_date": datetime.date.today(),
"mandate_id": "1234",
"mandate_date": datetime.date.today(),
"description": "Test transaction",
# "endtoend_id": str(uuid.uuid1()) # autogenerated if obmitted
}
sepa.add_payment(payment)
print(sepa.export(valudate=True))
Credit transfer
Example:
from sepaxml import SepaTransfer
import datetime, uuid
config = {
"name": "Test von Testenstein",
"IBAN": "NL50BANK1234567890",
"BIC": "BANKNL2A",
"batch": True,
"currency": "EUR", # ISO 4217
}
sepa = SepaTransfer(config, clean=True)
payment = {
"name": "Test von Testenstein",
"IBAN": "NL50BANK1234567890",
"BIC": "BANKNL2A",
"amount": 5000, # in cents
"execution_date": datetime.date.today(),
"description": "Test transaction",
# "endtoend_id": str(uuid.uuid1()) # optional
}
sepa.add_payment(payment)
print(sepa.export(validate=True))
Development
To run the included tests:
pip install -r requirements_dev.txt py.test tests
To automatically sort your Imports as required by CI:
pip install isort isort -rc .
Credits and License
Maintainer: Raphael Michel <mail@raphaelmichel.de>
This basically started as a properly packaged, python 3 tested version of the PySepaDD implementation that was released by The Congressus under the MIT license. Thanks for your work!
License: MIT
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
sepaxml-2.1.0.tar.gz
(23.3 kB
view details)
Built Distribution
sepaxml-2.1.0-py3-none-any.whl
(20.0 kB
view details)
File details
Details for the file sepaxml-2.1.0.tar.gz
.
File metadata
- Download URL: sepaxml-2.1.0.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18e1c88b3809044f49c0d2ad2b75b5aa15bc9e22323a2d50c45eb6e775e22009 |
|
MD5 | 4a263e43d616238a08b7ccc60da98232 |
|
BLAKE2b-256 | df88c860953f74a7e73f77ea62fffc45b673cdfdc933e8f3091260465e241f36 |
File details
Details for the file sepaxml-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: sepaxml-2.1.0-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cb8b394f8e47f95ac4473dd9d0751ce538f2563add205dba2e060d1c7c9d3f4 |
|
MD5 | 6b59ee16d006e4d3d3f3049e1a6d68be |
|
BLAKE2b-256 | dea78d1503c2eee6306e4be9931173a7ae6d239e8ab25abb188eb964ef791865 |