Skip to main content

jj2c

version number: 0.2.1 author: Tom Tang

Overview

Jinja2 compiler

Installation / Usage

To install use pip:

$ pip install jj2c

To use it:

Render from folder to folder: jj2c template_folder/ -V 'a: AAA' 'b: BBB' -o output_folder/

Render from zip to folder: jj2c template.zip -V 'a: AAA' 'b: BBB' -o output_folder/

Render from zip to zip: jj2c template.zip -V 'a: AAA' 'b: BBB' -o template.zip

Render to stdout: jj2c template-file -V 'a: AAA' 'b: BBB'

Or clone the repo:

$ git clone https://github.com/tly1980/jj2c.git
$ python setup.py install

Using Jinja2 extendsions

Let say you have a use_do.tpl with following contents:

{%- set a = [] -%}
{%- do a.append(1) -%}
{%- do a.append(2) -%}
{%- do a.append(name) -%}
{{ a }}

In order to render those content properly you will need jinja2.ext.do extension.

Use -e or --extensions tags to specify the extensions. And you can specify more than one.

jj2c tests/fixtures/use_do.tpl -V 'name: jack' -e jinja2.ext.do jinja2.ext.i18n

Output is:

Using extensions: ['jinja2.ext.do', 'jinja2.ext.i18n']
Compiling... file to stdout
src: tests/fixtures/use_do.tpl
dest:-
[1, 2, 'jack']

Contributing

TBD

Example

TBD

Metadata

Release files for jj2c 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jj2c 0.2.1
File Size Uploaded Provenance
jj2c-0.2.1.tar.gz 17.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for jj2c 0.2.1
File Interpreter ABI Platform
jj2c-0.2.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 23.5 kB

Release files / jj2c-0.2.1.tar.gz

Download URL jj2c-0.2.1.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b1c4cc5a848510420fb86966180164e064a731a38be95be7ba75886371b7646a
BLAKE2b-256 checksum
How to use checksums
830f704f1abfaa1d30e4efae391c33383521774f1fa65d18d77cd6529d4ebaf2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.4

Release files / jj2c-0.2.1-py2.py3-none-any.whl

Download URL jj2c-0.2.1-py2.py3-none-any.whl
Size 5.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
314c895b1867653318efcf1083a46d4c72ff64058cc6eb8489c2686b98899cf0
BLAKE2b-256 checksum
How to use checksums
18bc7ac65b20d192fbe9009c44d99493cc26165447e0eb35405dfcceafdeb15c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.4

Security for jj2c 0.2.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page