pallets/jinja


A very fast and expressive template engine.

https://palletsprojects.com/p/jinja/

License: BSD-3-Clause

Language: Python

Keywords: jinja, jinja2, python, template-engine, templates


Jinja

Jinja is a fast, expressive, extensible templating engine. Special placeholders in the template allow writing code similar to Python syntax. Then the template is passed data to render the final document.

It includes:

  • Template inheritance and inclusion.
  • Define and import macros within templates.
  • HTML templates can use autoescaping to prevent XSS from untrusted user input.
  • A sandboxed environment can safely render untrusted templates.
  • AsyncIO support for generating templates and calling async functions.
  • I18N support with Babel.
  • Templates are compiled to optimized Python code just-in-time and cached, or can be compiled ahead-of-time.
  • Exceptions point to the correct line in templates to make debugging easier.
  • Extensible filters, tests, functions, and even syntax.

Jinja's philosophy is that while application logic belongs in Python if possible, it shouldn't make the template designer's job difficult by restricting functionality too much.

Installing

Install and update using pip:

$ pip install -U Jinja2

In A Nutshell

{% extends "base.html" %}
{% block title %}Members{% endblock %}
{% block content %}
  <ul>
  {% for user in users %}
    <li><a href="{{ user.url }}">{{ user.username }}</a></li>
  {% endfor %}
  </ul>
{% endblock %}

Links

Project Statistics

Sourcerank 21
Repository Size 4.66 MB
Stars 6,569
Forks 1,252
Watchers 256
Open issues 79
Dependencies 5
Contributors 214
Tags 33
Created
Last updated
Last pushed

Top Contributors See all

Armin Ronacher David Lord Markus Unterwaditzer Adrian Georg Brandl Christoph Hack Jon Dufresne Sebastian Noack Kristi Joshua Bronson Jeff Widman Kevin Brown Cory Benfield TW Steely Wing Erik Johnson lkarthee Florian Bruhin Berker Peksag R. DuPlain

Packages Referencing this Repo

jinja2
Jinja2 is a full featured template engine for Python. It has full unicode support, an optional in...
Latest release 2.10.3 - Updated - 6.57K stars
Jinja2
A very fast and expressive template engine.
Latest release 2.10.3 - Updated - 6.57K stars

Recent Tags See all

2.10.3 October 04, 2019
2.10.2 October 04, 2019
2.10.1 April 06, 2019
2.10 November 08, 2017
2.9.6 April 03, 2017
2.9.5 January 28, 2017
2.9.4 January 10, 2017
2.9.3 January 08, 2017
2.9.2 January 08, 2017
2.9.1 January 07, 2017
2.9 January 07, 2017
2.8.1 December 29, 2016
2.8 July 26, 2015
2.7.3 June 06, 2014
2.7.2 January 10, 2014

Interesting Forks See all

yole/jinja2
The Jinja2 template engine
Python - BSD-3-Clause - Last pushed - 2 stars
friendradio/jinja2
The Jinja2 template engine
Python - BSD-3-Clause - Updated - 1 stars
Bitduct/jinja2
The Jinja2 template engine
Python - BSD-3-Clause - Updated - 1 stars
Tippr/jinja2
The Jinja2 template engine
Python - BSD-3-Clause - Last pushed - 1 stars
theatlantic/jinja2
The Jinja2 template engine
Python - BSD-3-Clause - Updated - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2019-10-21 15:08:23 UTC

Login to resync this repository