Cfdi Xml Transformation column format/csv
Project description
PyCfdi
PyCfdi Transform es un paquete de python que te permite convertir un Xml CFDI México a formato columnar.
Cfdi 3.3 y 3.2 con complementos: Nomina12 ( cfdi 3.3 ) Nomina ( cfdi 3.2 ) Pagos10 ( cfdi 3.3)
SW sapien
Queremos compartir la experiencia que tenemos en Facturación Electrónica con la comunidad. Nuestro objetivo es facilitar la implementación y mantenimiento del Cfdi en México.
Build and Release status
Installation
Utiliza el package manager pip para instalar pycfdi-transform.
pip install pycfdi-transform
Usage
XSLT Transformation
import pycfdi_transform as ct
path_xml = "./tests/Resources/cfdi33_01.xml" #path xml que queremos transformar
transformer = ct.TCfdi33() # Cfdi 3.3
result_columns = transformer.to_columns_from_file(path_xml)
print(result_columns[0]) # Contenido del xml
print(transformer.get_column_names()) # Cabeceras del contenido del xml
SAX Transformation
import pycfdi_transform as ct
path_xml = "./tests/Resources/cfdi33_01.xml" #path xml que queremos transformar
transformer = ct.TSaxCfdi33() # Cfdi 3.3
result_columns = transformer.to_columns_from_file(path_xml)
print(result_columns[0]) # Contenido del xml
print(transformer.get_column_names()) # Cabeceras del contenido del xml
Contributing
Pull requests son bienvenidos. Para cambios mayores, por favor abre un issue primero para poder discutir que deseas cambiar.
Asegurate de actualizar los tests de acuerdo a tus cambios.
Testing
python -m unittest discover
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for pycfdi_transform-0.0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2444b7594beb04cfe07b5ea8d0434f94aa43d93d181e3670dbebc27914276036 |
|
MD5 | 37146b7c80221f8688f6472711703b1f |
|
BLAKE2b-256 | c2426cb39331aa2b861ffd143ff3d6a4b38bdbae72614bf07b0155bc137d8c5d |