speicep
SDK oficial de SPEICEP para Python. Valida transferencias SPEI/SPID contra el CEP de Banxico con una sola llamada.
La API key es secreta. Usa este SDK solo en tu backend.
Instalacion
pip install speicep
Uso
from speicep import SpeiCep
speicep = SpeiCep("sk_live_...")
# 1) Validar un comprobante (imagen o PDF)
res = speicep.validate("comprobante.pdf")
print(res["status"]) # "valid" | "not_found" | "failed"
print(res.get("cep")) # CEP oficial completo (si es valido)
# 2) Validar con datos a mano (sin archivo)
res2 = speicep.validate_manual(
operation_date="28-08-2026",
tracking_key="058-28/08/2026/28-084ZUZW879",
sender_bank="BANORTE",
amount=12876.00,
)
# 3) Consultar una validacion previa
v = speicep.get_validation("9cad30ac-...")
Otras formas de pasar el archivo
# bytes (requiere filename)
speicep.validate(datos_bytes, filename="comprobante.jpg")
# elegir una cuenta receptora especifica
speicep.validate("comprobante.pdf", receiver_account_id="ee7480a3-...")
Manejo de errores
from speicep import SpeiCep, SpeiCepError
try:
speicep.validate("comprobante.pdf")
except SpeiCepError as e:
print(e.status, str(e), e.data) # ej. 401 invalid_api_key
Documentacion completa: https://speicep.com/docs
Metadata
Release files for speicep 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| speicep-0.1.0.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| speicep-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / speicep-0.1.0.tar.gz
| Download URL | speicep-0.1.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb0736de9a8cbc55ba63e0937635a81063332fcc8d04082dd7ba39486e2fcfff
|
|
BLAKE2b-256 checksum How to use checksums |
9fd638c6efd44cdab4c69b4348a86a7e1be026b2596bdca7c4615be46812769d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / speicep-0.1.0-py3-none-any.whl
| Download URL | speicep-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a0d126e778e99157e678944ac04f9b2b09c75083f4cc40f857b26512799376d
|
|
BLAKE2b-256 checksum How to use checksums |
e2b4c7e2d89a30290af218fa961886c8bdef49592cd845785ac084947b7d20e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|