Skip to main content

SignXML Sunat: XML Signature in Python for SUNAT

SignXML Sunat is an implementation of the W3C XML Signature standard in Python. SignXML Sunat implements all of the required components of the standard, and most recommended ones. Its features are:

  • Well-supported, portable, reliable dependencies: lxml, xmlsec

  • Simple interface with useful defaults

  • Compactness, readability, and extensibility

Installation

pip install signxml_sunat

Note: SignXML SUNAT depends on lxml and xmlsec

OS

Python

Command

Ubuntu 16.04, 18.04

Python 3

pip install lxml xmlsec

Note: In windows you need install a binary for lxml and xmlsec https://www.lfd.uci.edu/~gohlke/pythonlibs

Synopsis

SignXML SUNAT uses the ElementTree API (also supported by lxml) to work with XML data.

from signxml_sunat import XMLSigner, XMLVerifier

signed_root = XMLSigner().sign('doc.xml', key_data='rsakey.pem', cert_data='rsacert.pem')
# if you need password
# signed_root = XMLSigner().sign('doc.xml', key_data='rsakey.pem', cert_data='rsacert.pem', password='p4ssw0rd')
verified = XMLVerifier().verify('signed_doc.xml', key_data='rsakey.pem')
# if you need password
# verified_data = XMLVerifier().verify('signed_doc.xml', key_data='rsakey.pem', password='p4ssw0rd')

Authors

  • Danilo Britto Nuñez

Bugs

Please report bugs, issues, feature requests, etc. on GitHub.

Metadata

Release files for signxml_sunat 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for signxml_sunat 1.0.3
File Size Uploaded Provenance Actions
signxml_sunat-1.0.3.tar.gz 2.4 kB Without provenance Details for signxml_sunat-1.0.3.tar.gz

Release files / signxml_sunat-1.0.3.tar.gz

Download URL signxml_sunat-1.0.3.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ed0c27d6c5ee43811243a20c7f11cb43f04d868da51a8e0bd4428a3c2299074c
BLAKE2b-256 checksum
How to use checksums
f10206402b044a2fe6bbeecde7a0af96c3b84a2b9bab7558f9c0c3ea0c81e852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Security for signxml_sunat 1.0.3

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.

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page