JSON to MAKO generator
Python script that converts JSON database(s) to any templated output using MAKO templates.
Installing
pip3 install mlx.json_to_mako
Usage
The script takes multiple JSON input files, combines them in a python list, and renders the data through a provided template. No data-parsing functionality is provided by the script: the complexity of ‘interpreting’ the data is done in the MAKO templates.
Example
General use:
json-to-mako --input database.json --template rendering.mako --output rendered.html
The MAKO-template should match the dataformat of the JSON input file. The script adds
a list at the top level: multiple input JSON files are appended to a list,
some metadata in order to identify the input source
The usage on how to match the dataformat between JSON and MAKO is explained through an example in the example/ directory.
Multiple input files
The –input flag can be provided multiple times in order to provide multiple JSON databases. This is explained by the example.
json-to-mako --input database1.json --input database2.json--template rendering.mako --output rendered.html
The multiple JSON databases are appended into a python list. Your MAKO-template needs to incorporate this by e.g. looping over the different databases. See example/ folder for details.
Metadata
Release files for mlx.json-to-mako 0.4
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 |
|---|---|---|---|---|
| mlx.json_to_mako-0.4.tar.gz | 11.5 kB | Without provenance | Details for mlx.json_to_mako-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mlx.json_to_mako-0.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for mlx.json_to_mako-0.4-py2.py3-none-any.whl |
Total release size: 18.1 kB
Release files / mlx.json_to_mako-0.4.tar.gz
| Download URL | mlx.json_to_mako-0.4.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2bbb9c3a7454de8c66d42f83e51d708cc65433551b0e7706d380094f0b521778
|
|
BLAKE2b-256 checksum How to use checksums |
1fbce730bba53a2148ffaec1583e2f9041dfdc2be9b5a5e81c1d2d496d63873b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / mlx.json_to_mako-0.4-py2.py3-none-any.whl
| Download URL | mlx.json_to_mako-0.4-py2.py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
346b8d647431403b9c1dcd85fbe4e129cfac9c0f98fae7da121a850124407bd5
|
|
BLAKE2b-256 checksum How to use checksums |
15dd95b91b2a97531f479977b5cdb7816d17c9ae221d2e399f593738a9da1db5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for mlx.json-to-mako 0.4
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.