Skip to content
/ pysri Public

Facturación electrónica del SRI con Python

Notifications You must be signed in to change notification settings

jsonfm/pysri

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
)

Releases

No releases published

Packages

No packages published

Languages