Skip to main content

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

Build Status

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

GNU

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pycfdi_transform-0.0.0.15-py3-none-any.whl (66.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page