spei-python


Namespei-python JSON
Version 1.0.6 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2025-08-19 23:33:25
maintainerNone
docs_urlNone
authortech
requires_python<4.0,>=3.11
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide)

spei-python
===========

A library for accessing the SPEI API and SICE API for python.


## Installation
Use the package manager [poetry](https://pypi.org/project/poetry/) to install.

    poetry install spei-python

## Usage
Use our client to send orders to SPEI.
```python
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.
```python
from spei.sice import BaseClient

client = BaseClient(
    host='https://172.30.3.204:8443',
)
```

## Methods
- [registra_orden](/spei/client.py#58)
- [registra_cda](/spei/sice.py#25)

## Resources
There are four main resources.

- [Orden](spei/resources/orden.py) our abstraction of order, this goes through SPEI as XML.
- [Respuesta](spei/resources/respuesta.py) our abstraction of received SPEI messages and response to SPEI orders.
- [CDA](spei/resources/cda.py) our abstraction of cda, this goes through SICE as XML.
- [Acuse](spei/resources/acuse.py) our abstraction of received SICE messages and confirmation message to SICE.

## Types
- [TipoPagoOrdenPago](/spei/types.py#6) Order payment type.
- [TipoOrdenPago](/spei/types.py#33) Order type.
- [TipoCuentaOrdenPago](/spei/types.py#38) Account type.
- [PrioridadOrdenPago](/spei/types.py#58) Order priority.
- [CategoriaOrdenPago](/spei/types.py#63) Order Category.
- [EstadoOrdenPago](/spei/types.py#76) Order status.
- [ClaveOrdenanteOrdenPago](/spei/types.py#83) Root Institution Code.
- [FolioOrdenPago](/spei/types.py#87) Order invoice identifier.
- [MedioEntregaOrdenPago](/spei/types.py#91) Order transmission method.
- [TopologiaOrdenPago](/spei/types.py#107) Order notification method.

## Requests
These are used to perform requests to karpay using our resources.
- [OrdenRequest](spei/requests/orden.py) Maps an existing orden to XML.
- [RespuestaRequest](spei/requests/respuesta.py) Maps an existing respuesta to XML.
- [CDARequest](spei/requests/cda.py) Maps an existing CDA to XML.

## Responses
These are used to map karpay results to our resources.
- [AcuseResponse](spei/responses/orden.py) Maps a acuse XML to our CDA resource.
- [RespuestaResponse](spei/responses/respuesta.py) Maps a respuesta XML to our Response resource.

## Errors
Available [errors](/spei/errors.py) messages from Karpay.

These errors are included inside respuesta.

## Test
Tested with [mamba](https://mamba-framework.readthedocs.io/en/latest/), 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
[MIT](https://choosealicense.com/licenses/mit/)

## Checksum Generator
This repo includes a utility to generate [firma digital aplicada](https://www.notion.so/fondeadoraroot/Algoritmo-de-Firma-e-Karpay-SPEI-02e6c25b7c5943bea054ae37c9605bdc)

```sh
python bin/generate_checksum.py bin/message.json
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "spei-python",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "tech",
    "author_email": "tech@fondeadora.com",
    "download_url": "https://files.pythonhosted.org/packages/13/73/45c27ebe345833957dd0a98327bef622a3e2b3ab2747ecd9de9bb18bc0ed/spei_python-1.0.6.tar.gz",
    "platform": null,
    "description": "[![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide)\n\nspei-python\n===========\n\nA library for accessing the SPEI API and SICE API for python.\n\n\n## Installation\nUse the package manager [poetry](https://pypi.org/project/poetry/) to install.\n\n    poetry install spei-python\n\n## Usage\nUse our client to send orders to SPEI.\n```python\nfrom spei.client import BaseClient\n\nclient = BaseClient(\n    host='http://karpay-beta.intfondeadora.app',\n    username='karpay',\n    password='password',\n    priv_key='private_key',\n    priv_key_passphrase='passphrase',\n)\n```\n\nUse our client to send orders to SICE.\n```python\nfrom spei.sice import BaseClient\n\nclient = BaseClient(\n    host='https://172.30.3.204:8443',\n)\n```\n\n## Methods\n- [registra_orden](/spei/client.py#58)\n- [registra_cda](/spei/sice.py#25)\n\n## Resources\nThere are four main resources.\n\n- [Orden](spei/resources/orden.py) our abstraction of order, this goes through SPEI as XML.\n- [Respuesta](spei/resources/respuesta.py) our abstraction of received SPEI messages and response to SPEI orders.\n- [CDA](spei/resources/cda.py) our abstraction of cda, this goes through SICE as XML.\n- [Acuse](spei/resources/acuse.py) our abstraction of received SICE messages and confirmation message to SICE.\n\n## Types\n- [TipoPagoOrdenPago](/spei/types.py#6) Order payment type.\n- [TipoOrdenPago](/spei/types.py#33) Order type.\n- [TipoCuentaOrdenPago](/spei/types.py#38) Account type.\n- [PrioridadOrdenPago](/spei/types.py#58) Order priority.\n- [CategoriaOrdenPago](/spei/types.py#63) Order Category.\n- [EstadoOrdenPago](/spei/types.py#76) Order status.\n- [ClaveOrdenanteOrdenPago](/spei/types.py#83) Root Institution Code.\n- [FolioOrdenPago](/spei/types.py#87) Order invoice identifier.\n- [MedioEntregaOrdenPago](/spei/types.py#91) Order transmission method.\n- [TopologiaOrdenPago](/spei/types.py#107) Order notification method.\n\n## Requests\nThese are used to perform requests to karpay using our resources.\n- [OrdenRequest](spei/requests/orden.py) Maps an existing orden to XML.\n- [RespuestaRequest](spei/requests/respuesta.py) Maps an existing respuesta to XML.\n- [CDARequest](spei/requests/cda.py) Maps an existing CDA to XML.\n\n## Responses\nThese are used to map karpay results to our resources.\n- [AcuseResponse](spei/responses/orden.py) Maps a acuse XML to our CDA resource.\n- [RespuestaResponse](spei/responses/respuesta.py) Maps a respuesta XML to our Response resource.\n\n## Errors\nAvailable [errors](/spei/errors.py) messages from Karpay.\n\nThese errors are included inside respuesta.\n\n## Test\nTested with [mamba](https://mamba-framework.readthedocs.io/en/latest/), install poetry dev packages and then run tests.\n\n    poetry run make test\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n\n## Checksum Generator\nThis repo includes a utility to generate [firma digital aplicada](https://www.notion.so/fondeadoraroot/Algoritmo-de-Firma-e-Karpay-SPEI-02e6c25b7c5943bea054ae37c9605bdc)\n\n```sh\npython bin/generate_checksum.py bin/message.json\n```\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "1.0.6",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "81bf0873ef1b1315ab5cbc34810313256711b163bc4a41e841e941d9587cff3e",
                "md5": "6970f4e95fc5aaa0914fb59de45cb125",
                "sha256": "c8c2fda887e7c3377c3c89a78e95fdde06462a1b3c35e7ee254cca9c0fc73f69"
            },
            "downloads": -1,
            "filename": "spei_python-1.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6970f4e95fc5aaa0914fb59de45cb125",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 35064,
            "upload_time": "2025-08-19T23:33:24",
            "upload_time_iso_8601": "2025-08-19T23:33:24.570711Z",
            "url": "https://files.pythonhosted.org/packages/81/bf/0873ef1b1315ab5cbc34810313256711b163bc4a41e841e941d9587cff3e/spei_python-1.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "137345c27ebe345833957dd0a98327bef622a3e2b3ab2747ecd9de9bb18bc0ed",
                "md5": "ae8e63257b5d937dc673e77c06081942",
                "sha256": "18ed1784c0f913599a10f73c30781496761cfacf3e4676c62262ddb42c748864"
            },
            "downloads": -1,
            "filename": "spei_python-1.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "ae8e63257b5d937dc673e77c06081942",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 24390,
            "upload_time": "2025-08-19T23:33:25",
            "upload_time_iso_8601": "2025-08-19T23:33:25.507356Z",
            "url": "https://files.pythonhosted.org/packages/13/73/45c27ebe345833957dd0a98327bef622a3e2b3ab2747ecd9de9bb18bc0ed/spei_python-1.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-19 23:33:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "spei-python"
}
        
Elapsed time: 0.63240s