jsonfm / pysri

Facturación electrónica del SRI con Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PySRI

Python + SRI e-invoicing

Sign XML Invoice and Authorize

from pysri import sign_invoice_and_authorize, AmbienteType

with open("/signature.p12", mode="rb") as file:
    p12 = file.read() # bytes

invoice_xml = """<xml><data>some important data</data></xml>"""
response = sign_invoice_and_authorize(
    p12,
    "password",
    invoice_xml,
    AmbienteType.PRUEBAS,
    validate_input=True
)

About

Facturación electrónica del SRI con Python


Languages

Language:Python 100.0%