STP python3.6+ client library
Cliente para el servicio REST de STP
Requerimientos
Python v3.6 o superior.
Documentación de API
Instalación
pip install stpmex
Correr pruebas
make venv
source venv/bin/activate
make test
Uso básico
import datetime as dt
from stpmex import Client
from stpmex.types import Pais
client = Client(
empresa='TU_EMPRESA',
priv_key='PKEY_CONTENIDO',
priv_key_passphrase='supersecret',
)
cuenta_persona_fisica = client.cuentas.alta(
nombre='Eduardo',
apellidoPaterno='Salvador',
apellidoMaterno='Hernández',
rfcCurp='SAHE800416HDFABC01',
cuenta='646180110400000007',
paisNacimiento=Pais.MX,
fechaNacimiento=dt.date(1980, 4, 14),
)
cuenta_persona_moral = client.cuentas_morales.alta(
nombre='LA TIENDITA DE LA ESQUINA SA DE CV',
cuenta='646180157036325892',
pais=Pais.MX,
fechaConstitucion=dt.date(2021, 1, 1),
rfcCurp='ABC200101AB0',
)
# Si deseas dar de alta una nueva clabe para la misma
# razón social, haces el mismo request sustituyendo `cuenta`
# con la nueva clabe
cuenta_persona_moral = client.cuentas_morales.alta(
nombre='LA TIENDITA DE LA ESQUINA SA DE CV',
cuenta='646180157036325832',
pais=Pais.MX,
fechaConstitucion=dt.date(2021, 1, 1),
rfcCurp='ABC200101AB0',
)
orden = client.ordenes.registra(
monto=1.2,
cuentaOrdenante=cuenta.cuenta,
nombreBeneficiario='Ricardo Sanchez',
cuentaBeneficiario='072691004495711499',
institucionContraparte='40072',
conceptoPago='Prueba',
)
# Saldo
saldo = client.saldos.consulta(cuenta='646456789123456789')
# Ordenes - enviadas
enviadas = client.ordenes.consulta_enviadas() # fecha_operacion es el día de hoy
# Ordenes - recibidas
recibidas = client.ordenes.consulta_recibidas(
fecha_operacion=dt.date(2020, 4, 20)
)
# Orden - consulta por clave rastreo
orden = client.ordenes.consulta_clave_rastreo(
claveRastreo='CR1234567890',
institucionOperante=90646,
fechaOperacion=dt.date(2020, 4, 20)
)
Metadata
Release files for stpmex 3.15.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stpmex-3.15.1.tar.gz | 25.2 kB | Without provenance | Details for stpmex-3.15.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stpmex-3.15.1-py3-none-any.whl | Python 3 | none | any | Details for stpmex-3.15.1-py3-none-any.whl |
Total release size: 54.4 kB
Release files / stpmex-3.15.1.tar.gz
| Download URL | stpmex-3.15.1.tar.gz |
|---|---|
| Size | 25.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e974f130ba4860208711d5123d1cc97dd4972650a4a87379ab3410c5712e28e
|
|
BLAKE2b-256 checksum How to use checksums |
8d09e1b0b2d3bd4cadb8e384ec3ee58f156f2a25e600ffd8427b06e63f966990
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / stpmex-3.15.1-py3-none-any.whl
| Download URL | stpmex-3.15.1-py3-none-any.whl |
|---|---|
| Size | 29.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7706456123b725b2d5a3f858a2f2738e006912536ba6980200a0c491cd8fc48
|
|
BLAKE2b-256 checksum How to use checksums |
c76e71066a57a9db2e7d63f030f8bd62c066a7d2424fbb4ef8b12c34afbe8dc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for stpmex 3.15.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.