pykude
Python library for generating KuDE (Kuatia Documento Electrónico) PDF representations from SIFEN XML documents (Paraguay electronic invoicing system).
Inspired by BrazilFiscalReport.
Installation
pip install pykude[all]
Quick Start
from pykude import KudeFe
with open("factura.xml", "r", encoding="utf-8") as f:
xml = f.read()
kude = KudeFe(xml=xml)
kude.output("kude_factura.pdf")
Auto-detect Document Type
from pykude import auto_kude
kude = auto_kude(xml=xml_content)
kude.output("kude.pdf")
Supported Document Types
| KuDE Type | Class | Description |
|---|---|---|
| Factura Electrónica (FE) | KudeFe |
Electronic Invoice |
| Nota de Crédito (NCE) | KudeNce |
Credit Note |
| Nota de Débito (NDE) | KudeNde |
Debit Note |
| Autofactura (AFE) | KudeAfe |
Self-Invoice |
| Nota de Remisión (NRE) | KudeNre |
Remission Note |
| Comprobante de Retención (CRE) | KudeCre |
Withholding Certificate |
Configuration
from pykude.kude_fe import KudeFe, KudeFeConfig, Margins
config = KudeFeConfig(
logo="path/to/logo.png",
margins=Margins(top=8, right=8, bottom=8, left=8),
)
kude = KudeFe(xml=xml_content, config=config)
kude.output("kude.pdf")
Ticket Format (80mm thermal printer)
from pykude.kude_ticket import KudeTicket
kude = KudeTicket(xml=xml_content)
kude.output("ticket.pdf")
CLI
# Generate KuDE from XML
pfr kude-fe factura.xml -o kude.pdf
# With logo
pfr kude-fe factura.xml --logo logo.png -o kude.pdf
# Ticket format
pfr kude-fe factura.xml --format ticket -o ticket.pdf
Development
git clone https://github.com/KMEE/pykude.git
cd pykude
pip install -e ".[all,test]"
pytest
License
MIT License - Copyright (c) 2024-2026 KMEE
Author
mileo (mileo@kmee.com.br)
Metadata
Release files for pykude 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 | Provenance | Actions |
|---|---|---|---|---|
| pykude-0.1.0.tar.gz | 23.2 kB | Without provenance | Details for pykude-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pykude-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pykude-0.1.0-py3-none-any.whl |
Total release size: 51.5 kB
Release files / pykude-0.1.0.tar.gz
| Download URL | pykude-0.1.0.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
652bd0e4b82f17cea7b1726092f78d8d36814f0f8bd5a3b47bf38b0d26fbc559
|
|
BLAKE2b-256 checksum How to use checksums |
42e900d93d7e92e45d194d4da3b8419ef4e0c2c071aa21218599377dbfbeae2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / pykude-0.1.0-py3-none-any.whl
| Download URL | pykude-0.1.0-py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db1c6bfbe0e3f245ca7ab5914e14de154049c15b5313e014696cb3418e7895db
|
|
BLAKE2b-256 checksum How to use checksums |
f0ffad639b2bfb7c78d774e261c21917242ade156332bae20a6c085b8cf39305
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for pykude 0.1.0
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.