edgarronda / stpmex-python

Python client library for STP (stpmex.com)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

STP python3.6+ client library

Build Status Coverage Status PyPI

Cliente para el servicio REST de STP

Requerimientos

Python v3.6 o superior.

Documentación de API

General y WADL

Instalación

pip install stpmex

Correr pruebas

make venv
source venv/bin/activate
make test

Uso básico

from stpmex import Client

client = Client(
    empresa='TU_EMPRESA',
    priv_key='PKEY_CONTENIDO',
    priv_key_passphrase='supersecret',
)

cuenta = client.cuentas.alta(
    nombre='Eduardo',
    apellidoPaterno='Salvador',
    apellidoMaterno='Hernández',
    rfcCurp='SAHE800416HDFABC01',
    cuenta='646180110400000007',
)

orden = client.ordenes.registra(
    monto=1.2,
    cuentaOrdenante=cuenta.cuenta,
    nombreBeneficiario='Ricardo Sanchez',
    cuentaBeneficiario='072691004495711499',
    institucionContraparte='40072',
    conceptoPago='Prueba',
)

cuenta.baja()

About

Python client library for STP (stpmex.com)

License:MIT License


Languages

Language:Python 97.6%Language:Makefile 2.4%