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
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
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 Distribution
Built Distribution
File details
Details for the file arrendatools_plantillas-0.5.0.tar.gz
.
File metadata
- Download URL: arrendatools_plantillas-0.5.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b55f25d89d0361a8df1f35bb8032de4635696c44aaacfb5164837353516b9736 |
|
MD5 | 101154049abedc09332292554e6a2fa5 |
|
BLAKE2b-256 | 88efc804b1586c03c50d4347d616bb27515a7d11256e1738a1efee774f1cd2c5 |
File details
Details for the file arrendatools.plantillas-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: arrendatools.plantillas-0.5.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdcdad3947eae2c8153e10e99670d1d0ade81ebe74277e00c89841ee54fdb3a0 |
|
MD5 | 0dcf19626a3ffd1e290007226e169302 |
|
BLAKE2b-256 | c48df9a780f10284c40e21178e6d8b00b9f4b52476252b9fbf0e25e1949610f3 |