Skip to main content

Módulo de Python que aplica plantillas jinja. Además inlcuye filtros que pueden ser útiles para la generación de recibos de alquiler, facturas, informes,...

Project description

ArrendaTools Plantillas

License Build Status GitHub last commit GitHub commit activity

Módulo de Python que aplica plantillas jinja. Además inlcuye filtros que pueden ser útiles a los arrendadores para la generación de recibos de alquiler, facturas, generar informes,...

Requisitos

Este módulo requiere Python 3.7 o superior.

Uso

A continuación se muestra un ejemplo de cómo usar el módulo:

from arrendatools.plantillas.plantilla import aplicar_plantilla
import json

plantilla = "prueba.html"
fichero_datos = 'prueba.json'

with open(fichero_datos, encoding='utf-8') as json_file:
    data = json.load(json_file)

doc = aplicar_plantilla("./", plantilla, data)

with open('prueba-rendered.html', "wb") as archivo:
    archivo.write(doc.encode('utf-8'))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arrendatools_plantillas-0.5.0.tar.gz (15.6 kB view hashes)

Uploaded Source

Built Distribution

arrendatools.plantillas-0.5.0-py3-none-any.whl (6.9 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