Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

jinja

> 编程语言
Open source

A very fast and expressive template engine.

11.7K stars0 likes0 views
WebsiteGitHub

About

A very fast and expressive template engine.

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.

In A Nutshell

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

Donate

The Pallets organization develops and supports Jinja and other popular packages. In order to grow the community of contributors and users, and allow the maintainers to devote more time to the projects, please donate today.

Contributing

See our detailed contributing documentation for many ways to contribute, including reporting issues, requesting features, asking or answering questions, and making PRs.

Issues· 104 open

View all issuesOpen on GitHub
  • #2176

    `indent` filter ignores `blank`=`False` when `first`=`True` on first line

    Updated Sep 26, 2026
  • #2180

    TypeError: cannot use 'tuple' as a dict key in LRUCache on Python 3.14

    Updated Sep 25, 2026
  • #2269

    Something wrong occurred when generating a string for `UserDict`

    Updated Sep 22, 2026
  • #2244

    ChainableUndefined causes `is escaped` test to pass for `undefined` child elements

    Updated Aug 27, 2026
  • #2109

    poor performance when parsing unclosed string with many escape characters

    Updated Aug 26, 2026
  • #1156

    invalid escape sequence DeprecationWarning from template syntax itself

    bugUpdated Aug 9, 2026
  • #758

    deepcopy(jinja2.Template(...)) raises an exception

    bugUpdated Aug 9, 2026
  • #2145

    `test_elif_deep` fails on s390x with `RecursionError`

    Updated Jun 29, 2026
  • #1755

    explain associativity and precedence between operators

    docsUpdated Jun 14, 2026
  • #2172

    FilterArgumentError exception is not documented and not in the "jinja2" module

    Updated May 16, 2026

> Tags

Pythonjinjajinja2palletspython

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言