Skip to main content

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 %}

Release files for Jinja2 2.11.3

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

Source distribution (sdist)

Source distribution for Jinja2 2.11.3
File Size Uploaded
Jinja2-2.11.3.tar.gz 257.6 kB Details

Built distribution (wheel)

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

Total release size: 383.3 kB

Release files / Jinja2-2.11.3.tar.gz

Download URL Jinja2-2.11.3.tar.gz
Size 257.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6
BLAKE2b-256 checksum
How to use checksums
4fe765300e6b32e69768ded990494809106f87da1d436418d5f1367ed3966fd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

Release files / Jinja2-2.11.3-py2.py3-none-any.whl

Download URL Jinja2-2.11.3-py2.py3-none-any.whl
Size 125.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419
BLAKE2b-256 checksum
How to use checksums
7ec21eece8c95ddbc9b1aeb64f5783a9e07a286de42191b7204d67b7496ddf35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

Release history Release notifications | RSS feed

3.1.6

2 release files

3.1.5

2 release files

3.1.4

2 release files

3.1.3

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

This release

2.11.3 This release

2 release files

2.11.2

2 release files

2.11.1

2 release files

2.11.0

2 release files

2.10

2 release files

2.9.6

2 release files

2.9.5

2 release files

2.9.4

2 release files

2.9.3

2 release files

2.9.2

2 release files

2.9.1

2 release files

2.9

2 release files

2.8.1

2 release files

2.8

2 release files

2.7.3

1 release file

2.7.2

1 release file

2.7.1

1 release file

2.7

1 release file

2.6

1 release file

2.5.5

1 release file

2.5.4

1 release file

2.5.3

1 release file

2.5.2

1 release file

2.5.1

1 release file

2.5

1 release file

2.4.1

1 release file

2.4

1 release file

2.3.1

1 release file

2.3

1 release file

2.2.1

1 release file

2.2

1 release file

2.1.1

4 release files

2.1

4 release files

2.0

1 release file

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