MCPcopy
hub / github.com/pallets/jinja

github.com/pallets/jinja @3.1.6 sqlite

repository ↗ · DeepWiki ↗ · release 3.1.6 ↗
1,777 symbols 6,808 edges 60 files 498 documented · 28%
README

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

{% extends "base.html" %}
{% block title %}Members{% endblock %}
{% block content %}
  <ul>
  {% for user in users %}
    <li><a href="https://github.com/pallets/jinja/raw/3.1.6/{{ 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.

Core symbols most depended-on inside this repo

render
called by 689
src/jinja2/environment.py
from_string
called by 647
src/jinja2/environment.py
write
called by 145
src/jinja2/compiler.py
writeline
called by 123
src/jinja2/compiler.py
get_template
called by 112
src/jinja2/environment.py
visit
called by 92
src/jinja2/visitor.py
expect
called by 47
src/jinja2/lexer.py
indent
called by 37
src/jinja2/compiler.py

Shape

Method 1,208
Function 332
Class 237

Languages

Python100%

Modules by API surface

src/jinja2/compiler.py124 symbols
src/jinja2/nodes.py120 symbols
tests/test_lexnparse.py116 symbols
tests/test_filters.py112 symbols
src/jinja2/runtime.py94 symbols
tests/test_ext.py78 symbols
src/jinja2/filters.py78 symbols
src/jinja2/environment.py76 symbols
tests/test_async.py72 symbols
tests/test_core_tags.py70 symbols
tests/test_regression.py60 symbols
src/jinja2/utils.py57 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

MarkupSafe2.0 · 1×

For agents

$ claude mcp add jinja \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact