No project description provided
Project description
spei-python
A library for accessing the SPEI API and SICE API for python.
Installation
Use the package manager poetry to install.
poetry install spei-python
Usage
Use our client to send orders to SPEI.
from spei.client import BaseClient
client = BaseClient(
host='http://karpay-beta.intfondeadora.app',
username='karpay',
password='password',
priv_key='private_key',
priv_key_passphrase='passphrase',
)
Use our client to send orders to SICE.
from spei.sice import BaseClient
client = BaseClient(
host='https://172.30.3.204:8443',
)
Methods
Resources
There are four main resources.
- Orden our abstraction of order, this goes through SPEI as XML.
- Respuesta our abstraction of received SPEI messages and response to SPEI orders.
- CDA our abstraction of cda, this goes through SICE as XML.
- Acuse our abstraction of received SICE messages and confirmation message to SICE.
Types
- TipoPagoOrdenPago Order payment type.
- TipoOrdenPago Order type.
- TipoCuentaOrdenPago Account type.
- PrioridadOrdenPago Order priority.
- CategoriaOrdenPago Order Category.
- EstadoOrdenPago Order status.
- ClaveOrdenanteOrdenPago Root Institution Code.
- FolioOrdenPago Order invoice identifier.
- MedioEntregaOrdenPago Order transmission method.
- TopologiaOrdenPago Order notification method.
Requests
These are used to perform requests to karpay using our resources.
- OrdenRequest Maps an existing orden to XML.
- RespuestaRequest Maps an existing respuesta to XML.
- CDARequest Maps an existing CDA to XML.
Responses
These are used to map karpay results to our resources.
- AcuseResponse Maps a acuse XML to our CDA resource.
- RespuestaResponse Maps a respuesta XML to our Response resource.
Errors
Available errors messages from Karpay.
These errors are included inside respuesta.
Test
Tested with mamba, install poetry dev packages and then run tests.
poetry run make test
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Checksum Generator
This repo includes a utility to generate firma digital aplicada
python bin/generate_checksum.py bin/message.json
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 spei_python-0.34.0.tar.gz
.
File metadata
- Download URL: spei_python-0.34.0.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3a96ec9231aa28f1793d1cfd8caed35d1b93ec20887ea9f0ae2bc3b2e0b766d |
|
MD5 | 842aaa2196b7244aa24f744890854ac3 |
|
BLAKE2b-256 | 6ab53c00f7fb44fb337fa115f4088248edf245c82a78df34effaf6d533e0d78e |
File details
Details for the file spei_python-0.34.0-py3-none-any.whl
.
File metadata
- Download URL: spei_python-0.34.0-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da6ec12308060fe20b5b68a21c1342cac2a4c07d868fe1434d4f45554854479f |
|
MD5 | 492681b3915394b424036593480064a6 |
|
BLAKE2b-256 | 1357db8144fd0041ef793e89e7e886dd45d0fc961d874b2590fbbfcc1ac82e37 |