Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: Jinja2
3 Version: 3.1.6
4 Summary: A very fast and expressive template engine.
5 Maintainer-email: Pallets <[email protected]>
6 Requires-Python: >=3.7
7 Description-Content-Type: text/markdown
8 Classifier: Development Status :: 5 - Production/Stable
9 Classifier: Environment :: Web Environment
10 Classifier: Intended Audience :: Developers
11 Classifier: License :: OSI Approved :: BSD License
12 Classifier: Operating System :: OS Independent
13 Classifier: Programming Language :: Python
14 Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
15 Classifier: Topic :: Text Processing :: Markup :: HTML
16 Classifier: Typing :: Typed
17 License-File: LICENSE.txt
18 Requires-Dist: MarkupSafe>=2.0
19 Requires-Dist: Babel>=2.7 ; extra == "i18n"
20 Project-URL: Changes, https://jinja.palletsprojects.com/changes/
21 Project-URL: Chat, https://discord.gg/pallets
22 Project-URL: Documentation, https://jinja.palletsprojects.com/
23 Project-URL: Donate, https://palletsprojects.com/donate
24 Project-URL: Source, https://github.com/pallets/jinja/
25 Provides-Extra: i18n
26
27 # Jinja
28
29 Jinja is a fast, expressive, extensible templating engine. Special
30 placeholders in the template allow writing code similar to Python
31 syntax. Then the template is passed data to render the final document.
32
33 It includes:
34
35 - Template inheritance and inclusion.
36 - Define and import macros within templates.
37 - HTML templates can use autoescaping to prevent XSS from untrusted
38 user input.
39 - A sandboxed environment can safely render untrusted templates.
40 - AsyncIO support for generating templates and calling async
41 functions.
42 - I18N support with Babel.
43 - Templates are compiled to optimized Python code just-in-time and
44 cached, or can be compiled ahead-of-time.
45 - Exceptions point to the correct line in templates to make debugging
46 easier.
47 - Extensible filters, tests, functions, and even syntax.
48
49 Jinja's philosophy is that while application logic belongs in Python if
50 possible, it shouldn't make the template designer's job difficult by
51 restricting functionality too much.
52
53
54 ## In A Nutshell
55
56 ```jinja
57 {% extends "base.html" %}
58 {% block title %}Members{% endblock %}
59 {% block content %}
60 <ul>
61 {% for user in users %}
62 <li><a href="{{ user.url }}">{{ user.username }}</a></li>
63 {% endfor %}
64 </ul>
65 {% endblock %}
66 ```
67
68 ## Donate
69
70 The Pallets organization develops and supports Jinja and other popular
71 packages. In order to grow the community of contributors and users, and
72 allow the maintainers to devote more time to the projects, [please
73 donate today][].
74
75 [please donate today]: https://palletsprojects.com/donate
76
77 ## Contributing
78
79 See our [detailed contributing documentation][contrib] for many ways to
80 contribute, including reporting issues, requesting features, asking or answering
81 questions, and making PRs.
82
83 [contrib]: https://palletsprojects.com/contributing/
84