This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


tjst = Tiny JavaScript Templating

High performance JS template engine.

It supports:

  • Anything you can write on JS =)
  • Server-side and client-side compilation.
  • …?

It not supports:

  • Templates inheritence.
  • Includes.
  • …?


$ git clone
$ cd tjst && python install


$ pip install tjst


tjst supports only <% %> and <%= %> tags.

Suppose, we have file index.html file in some folder:

<!doctype html>
        <script src="tpl.js"></script>
        <div id="content"></div>

            var context = {
                users: [
                    {name: "Jeff", online: true,   info: "Jeff likes html"},
                    {name: "Mike", online: true,   info: "Mike likes css"},
                    {name: "Rose", online: false,  info: "Rose likes javascript"},
                    {name: "Anna", online: false,  info: "Anna likes perl"},
            document.getElementById('content').innerHTML = templates['tpl.html'](context);

And template file tpl.html in the same folder:

<% for (var i = 0; i < users.length; i++) { %>
        <strong style="color: <%=users[i].online ? 'green' : 'red'%>"><%=users[i].name%></strong> - <%=users[i].info%>
<% } %>

Install tjst and go to this folder. Compile template:

$ tjst-compile tpl.html tpl.js

Now view index.html in your browser. You can find all examples here:

Use as command-line tool

$ tjst-compile -e html,my-tpl-extension /path/to/template/file.html/or/folder /path/to/compiled/file.js

Use in python code

from tjst import compile_text2text, compile_file2file
js = compile_text2text('''
<% for (var i = 0; i < 10; i++) { %>
<% } %>
compile_file2file('templates_file_or_dir_path', 'dst_path.js', ['html', 'txt', 'my-ext'])


You can run tests with following commands:

$ git clone
$ cd tjst && python test


  • Basic functionality. Py3 support was not tested.
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tjst-0.1.0-py2-none-any.whl (7.4 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Mar 26, 2016
tjst-0.1.0.tar.gz (4.4 kB) Copy SHA256 Checksum SHA256 Source Mar 26, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting