{
  "id": "task_libraries:template-engine/python",
  "path": "/exapedia/python-template-engine-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python template engine libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python template engine libraries render HTML or text by filling a template with data. An engine either compiles templates that embed Python expressions or uses a restricted syntax such as Mustache or Liquid that keeps logic in the data. These libraries let web servers, code generators, and email tools build output from shared templates."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python template engine libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#jinjatwo",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F135"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mako-library",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F148"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#tornado-templates",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F165"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F58"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F176"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#chevron",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#bottle",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F210"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pystache",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F227"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#python-liquid",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F244"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#jinjatwo",
          "label": [
            {
              "t": "text",
              "text": "Jinja"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F136"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Native async rendering",
            "Autoescape enabled by default"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#jinjatwo",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F135"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mako-library",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F148"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#tornado-templates",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F165"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F176"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#chevron",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#bottle",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F210"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pystache",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F227"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#python-liquid",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F244"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "jinjatwo",
          "name": [
            {
              "t": "fact",
              "fact": "F135"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pallets/jinja"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/jinja2"
            },
            {
              "label": "Docs",
              "href": "https://jinja.palletsprojects.com/en/stable/api/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F142"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://jinja.palletsprojects.com/en/stable/api/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F135"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from jinja2 import Environment\n\nenvironment = Environment()\ntemplate = environment.from_string(\"Hello, {{ name }}!\")\nprint(template.render(name=\"World\"))",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://jinja.palletsprojects.com/en/stable/api/",
                  "label": [
                    {
                      "t": "text",
                      "text": "api.html"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=jinja2%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F135"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F140"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "mako-library",
          "name": [
            {
              "t": "fact",
              "fact": "F148"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/sqlalchemy/mako"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/mako"
            },
            {
              "label": "Docs",
              "href": "https://docs.makotemplates.org/en/latest/usage.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F155"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.makotemplates.org/en/latest/usage.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F148"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/sqlalchemy/alembic",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F163"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def template_to_file(\n    template_file: str | os.PathLike[str],\n    dest: str | os.PathLike[str],\n    output_encoding: str,\n    *,\n    append_with_newlines: bool = False,\n    **kw: Any,\n) -> None:\n    template = Template(filename=_preserving_path_as_str(template_file))\n    try:\n        output = template.render_unicode(**kw).encode(output_encoding)\n    except:\n        with tempfile.NamedTemporaryFile(suffix=\".txt\", delete=False) as ntf:\n            ntf.write(\n                exceptions.text_error_template()\n                .render_unicode()\n                .encode(output_encoding)\n            )\n            fname = ntf.name\n        raise CommandError(\n            \"Template rendering failed; see %s for a \"\n            \"template-oriented traceback.\" % fname\n        )\n    else:\n        with open(dest, \"ab\" if append_with_newlines else \"wb\") as f:\n            if append_with_newlines:\n                f.write(\"\\n\\n\".encode(output_encoding))\n            f.write(output)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/sqlalchemy/alembic/blob/1bcba93ea0473c69b48e704f842ca96e9e5348f5/alembic/util/pyfiles.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F162"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=mako%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F148"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from mako.template import Template\n\ntemplate = Template(\"hello world!\")\nprint(template.render())",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.makotemplates.org/en/latest/usage.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "usage.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F153"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "tornado-templates",
          "name": [
            {
              "t": "fact",
              "fact": "F165"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/tornadoweb/tornado"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/tornado"
            },
            {
              "label": "Docs",
              "href": "https://www.tornadoweb.org/en/stable/template.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F64"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F58"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.tornadoweb.org/en/stable/template.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F165"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F71"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F72"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from tornado.template import Template\n\ntemplate = Template(\"Hello {{ name }}!\")\nprint(template.generate(name=\"World\"))",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.tornadoweb.org/en/stable/template.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "template.html"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20applications%20using%20tornado%20for%20reusable%20layouts%2C%20generated%20migration%20files%2C%20web%20views%20and%20cached%20document%20rendering&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F165"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F170"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "django",
          "name": [
            {
              "t": "fact",
              "fact": "F176"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/django/django"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/django"
            },
            {
              "label": "Docs",
              "href": "https://docs.djangoproject.com/en/6.1/ref/templates/api/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F183"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.djangoproject.com/en/6.1/ref/templates/api/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F176"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/wagtail/wagtail",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F191"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def render_html(self, parent_context: MutableMapping[str, Any] = None) -> str:\n    if parent_context is None:\n        parent_context = Context()\n    context_data = self.get_context_data(parent_context)\n    if context_data is None:\n        raise TypeError(\"Expected a dict from get_context_data, got None\")\n\n    template = get_template(self.template_name)\n    return template.render(context_data)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/wagtail/wagtail/blob/14b9b12ee4b689eaebf735edebd8828ea17d829a/wagtail/admin/ui/components.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F190"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=django%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F176"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from django.template import Context, Engine\n\nengine = Engine()\ntemplate = engine.from_string(\"Hello {{ name }}!\")\nprint(template.render(Context({\"name\": \"World\"})))",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.djangoproject.com/en/6.1/ref/templates/api/",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F181"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "chevron",
          "name": [
            {
              "t": "fact",
              "fact": "F193"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/noahmorrison/chevron"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/chevron"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/pypi/chevron/0.14.0/json"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F200"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/chevron/0.14.0/json",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F193"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/microsoft/TinyTroupe",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F208"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def compose_initial_LLM_messages_with_templates(\n    system_template_name: str,\n    user_template_name: str = None,\n    base_module_folder: str = None,\n    rendering_configs: dict = {},\n) -> list:\n    \"\"\"\n    Composes the initial messages for the LLM model call, under the assumption that it always involves\n    a system (overall task description) and an optional user message (specific task description).\n    These messages are composed using the specified templates and rendering configurations.\n    \"\"\"\n\n    # ../ to go to the base library folder, because that's the most natural reference point for the user\n    if base_module_folder is None:\n        sub_folder = \"../prompts/\"\n    else:\n        sub_folder = f\"../{base_module_folder}/prompts/\"\n\n    base_template_folder = os.path.join(os.path.dirname(__file__), sub_folder)\n\n    system_prompt_template_path = os.path.join(\n        base_template_folder, f\"{system_template_name}\"\n    )\n    user_prompt_template_path = os.path.join(\n        base_template_folder, f\"{user_template_name}\"\n    )\n\n    messages = []\n\n    messages.append(\n        {\n            \"role\": \"system\",\n            \"content\": chevron.render(\n                open(\n                    system_prompt_template_path, \"r\", encoding=\"utf-8\", errors=\"replace\"\n                ).read(),\n                rendering_configs,\n            ),\n        }\n    )\n\n    # optionally add a user message\n    if user_template_name is not None:\n        messages.append(\n            {\n                \"role\": \"user\",\n                \"content\": chevron.render(\n                    open(\n                        user_prompt_template_path,\n                        \"r\",\n                        encoding=\"utf-8\",\n                        errors=\"replace\",\n                    ).read(),\n                    rendering_configs,\n                ),\n            }\n        )\n    return messages",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/microsoft/TinyTroupe/blob/7ce8be378a37ee73f9745d6781452712318afa04/tinytroupe/utils/llm.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F207"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=chevron%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F193"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import chevron\n\nprint(chevron.render(\"Hello, {{ mustache }}!\", {\"mustache\": \"World\"}))",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pypi.org/pypi/chevron/0.14.0/json",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F198"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "bottle",
          "name": [
            {
              "t": "fact",
              "fact": "F210"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/bottlepy/bottle"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/bottle"
            },
            {
              "label": "Docs",
              "href": "https://bottlepy.org/docs/0.13/stpl.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F217"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://bottlepy.org/docs/0.13/stpl.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F210"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/microsoft/aerial_wildlife_detection",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F225"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _initBottle(self):\n\n    @self.app.route('/version')\n    def aide_version():\n        return AIDE_VERSION\n\n\n    @self.app.route('/favicon.ico')\n    def favicon():\n        return static_file('favicon.ico', root='modules/StaticFiles/static/img')\n\n    with open(os.path.abspath(os.path.join('modules/StaticFiles/static/templates/about.html')), 'r', encoding='utf-8') as f:\n        self.aboutPage = SimpleTemplate(f.read())\n\n    with open(os.path.abspath(os.path.join('modules/StaticFiles/static/templates/privacy.html')), 'r', encoding='utf-8') as f:\n        self.privacyPage = SimpleTemplate(f.read())\n\n    @self.app.route('/about')\n    @self.app.route('/<project>/about')\n    def about(project=None):\n        return self.aboutPage.render(version=AIDE_VERSION)\n\n\n    @self.app.route('/privacy')\n    @self.app.route('/<project>/privacy')\n    def privacy(project=None):\n        return self.privacyPage.render(version=AIDE_VERSION)\n\n\n    @self.app.get('/getBackdrops')\n    def get_backdrops():\n        try:\n            return {'info': json.load(open('modules/StaticFiles/static/img/backdrops/backdrops.json', 'r'))}\n        except:\n            abort(500)\n\n\n    @self.app.route('/static/<module>/<filename:re:.*>')\n    def send_static(module, filename):\n        return static_file(filename, self.MODULE_ROUTINGS[module])\n\n    #TODO: can be removed\n    @self.app.route('/<project>/static/<module>/<filename:re:.*>')\n    def send_static_proj(project, module, filename):\n        return send_static(module, filename)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/microsoft/aerial_wildlife_detection/blob/e9c47993ce293fb234264ac94da158e9fce0d0fc/modules/StaticFiles/app.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F224"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=bottle%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F210"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from bottle import SimpleTemplate\n\ntemplate = SimpleTemplate(\"Hello {{name}}!\")\nprint(template.render(name=\"World\"))",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://bottlepy.org/docs/0.13/stpl.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "stpl.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F215"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pystache",
          "name": [
            {
              "t": "fact",
              "fact": "F227"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/PennyDreadfulMTG/pystache"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/pystache"
            },
            {
              "label": "Docs",
              "href": "https://api.github.com/repos/PennyDreadfulMTG/pystache/contents/README.rst?ref=v0.6.8"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F234"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/PennyDreadfulMTG/pystache/contents/README.rst?ref=v0.6.8",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F227"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/getredash/redash",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F242"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def mustache_render_escape(template, context=None, **kwargs):\n    renderer = pystache.Renderer()\n    return renderer.render(template, context, **kwargs)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/getredash/redash/blob/f561a53dc55eeb3f20615be951560dc78bb23f4c/redash/utils/__init__.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F241"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=pystache%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F227"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import pystache\n\nprint(pystache.render(\"Hi {{person}}!\", {\"person\": \"Mom\"}))",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/PennyDreadfulMTG/pystache/contents/README.rst?ref=v0.6.8",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F232"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "python-liquid",
          "name": [
            {
              "t": "fact",
              "fact": "F244"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/jg-rp/liquid"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/python-liquid"
            },
            {
              "label": "Docs",
              "href": "https://jg-rp.github.io/liquid/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F251"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://jg-rp.github.io/liquid/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F244"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import liquid\n\nprint(liquid.render(\"Hello, {{ you }}!\", {\"you\": \"World\"}))",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://jg-rp.github.io/liquid/",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.html"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=python-liquid%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F244"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F249"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python template engine should I use?",
      "a": [
        {
          "t": "link",
          "href": "#jinjatwo",
          "label": [
            {
              "t": "text",
              "text": "Jinja"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits most applications, with template inheritance, macros, async rendering, and a sandbox. "
        },
        {
          "t": "link",
          "href": "#mako-library",
          "label": [
            {
              "t": "text",
              "text": "Mako"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits templates that embed Python expressions and code. "
        },
        {
          "t": "link",
          "href": "#chevron",
          "label": [
            {
              "t": "text",
              "text": "Chevron"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#pystache",
          "label": [
            {
              "t": "text",
              "text": "Pystache"
            }
          ]
        },
        {
          "t": "text",
          "text": " suit logic-less Mustache templates."
        }
      ]
    },
    {
      "q": "What is Jinja?",
      "a": [
        {
          "t": "link",
          "href": "#jinjatwo",
          "label": [
            {
              "t": "text",
              "text": "Jinja"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a standalone template engine with loaders, macros, inheritance, optional async rendering, and a separate sandbox. HTML autoescaping must be configured explicitly."
        }
      ]
    },
    {
      "q": "Can a Jinja sandbox replace resource limits?",
      "a": [
        {
          "t": "text",
          "text": "No. Resource limits are still needed to contain excessive CPU or memory usage."
        }
      ]
    },
    {
      "q": "What is Mako?",
      "a": [
        {
          "t": "link",
          "href": "#mako-library",
          "label": [
            {
              "t": "text",
              "text": "Mako"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a templating language with embedded Python expressions and inheritance. Alembic uses it to generate migration files."
        }
      ]
    },
    {
      "q": "Does an asynchronous web handler make its renderer asynchronous?",
      "a": [
        {
          "t": "text",
          "text": "No. Tornado template generation returns bytes synchronously, even inside an async handler. Jinja supplies a separate asynchronous render method."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, Jinja2",
      "display": "Jinja",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, Jinja2",
      "display": "702.2M",
      "asOf": "2026-11-17"
    },
    "F3": {
      "label": "License, Jinja2",
      "display": "BSD",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, Jinja2",
      "display": "3.1.6, Mar 2025",
      "asOf": "2025-03-05"
    },
    "F5": {
      "label": "Package release date, Jinja2",
      "display": "Mar 2025",
      "asOf": "2025-03-05"
    },
    "F6": {
      "label": "Repository stars, Jinja2",
      "display": "11.8K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Template inheritance, Jinja2",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Automatic escaping, Jinja2",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Filesystem loader, Jinja2",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Output formats, Jinja2",
      "display": "HTML, Text",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, Jinja2",
      "display": "pip install Jinja2",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, Jinja2",
      "display": "Renders templates with reusable layouts, macros, configurable escaping, and optional asynchronous execution.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, Jinja2",
      "display": "Reuses parent template layouts",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, Jinja2",
      "display": "Define common page blocks that child templates can override.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, Jinja2",
      "display": "Supports asynchronous rendering",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, Jinja2",
      "display": "Enable async mode and await the complete rendered template string.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, Jinja2",
      "display": "Escaping needs explicit configuration",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, Jinja2",
      "display": "Enable autoescaping when rendering HTML with untrusted values.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, Jinja2",
      "display": "Sandboxing still needs resource limits",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, Jinja2",
      "display": "Limit CPU and memory when rendering user-authored templates.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, Jinja2",
      "display": "from jinja2 import Environment\nfrom jinja2.loaders import DictLoader\n\nenv = Environment(\n    loader=DictLoader(\n        {\n            \"child.html\": \"\"\"\\\n{% extends default_layout or 'default.html' %}\n{% import 'helpers.html' as helpers %}\n{% macro get_the_answer() %}42{% endmacro %}\n{% set title = 'Hello World' %}\n{% block body %}\n    {{ get_the_answer() }}\n    {{ helpers.conspirate() }}\n{% endblock %}\n\"\"\",\n            \"default.html\": \"\"\"\\\n<!doctype html>\n<title>{{ title }}</title>\n{% block body %}{% endblock %}\n\"\"\",\n            \"helpers.html\": \"\"\"\\\n{% macro conspirate() %}23{% endmacro %}\n\"\"\",\n        }\n    )\n)\ntmpl = env.get_template(\"child.html\")\nprint(tmpl.render())\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, Jinja2",
      "display": "def init(\n    self,\n    builder: Builder,\n    theme: Theme | None = None,\n    dirs: list[str] | None = None,\n) -> None:\n    # create a chain of paths to search\n    if theme:\n        # the theme's own dir and its bases' dirs\n        pathchain = theme.get_theme_dirs()\n        # the loader dirs: pathchain + the parent directories for all themes\n        loaderchain = pathchain + [p.parent for p in pathchain]\n    elif dirs:\n        pathchain = list(map(_StrPath, dirs))\n        loaderchain = list(map(_StrPath, dirs))\n    else:\n        pathchain = []\n        loaderchain = []\n\n    # prepend explicit template paths\n    self.templatepathlen = len(builder.config.templates_path)\n    if builder.config.templates_path:\n        cfg_templates_path = [\n            builder.confdir / tp for tp in builder.config.templates_path\n        ]\n        pathchain[0:0] = cfg_templates_path\n        loaderchain[0:0] = cfg_templates_path\n\n    # store it for use in newest_template_mtime\n    self.pathchain = pathchain\n\n    # make the paths into loaders\n    self.loaders = [SphinxFileSystemLoader(x) for x in loaderchain]\n\n    use_i18n = builder._translator is not None\n    extensions = ['jinja2.ext.i18n'] if use_i18n else []\n    self.environment = SandboxedEnvironment(loader=self, extensions=extensions)\n    self.environment.filters['tobool'] = _tobool\n    self.environment.filters['toint'] = _toint\n    self.environment.filters['todim'] = _todim\n    self.environment.filters['slice_index'] = _slice_index\n    self.environment.globals['debug'] = pass_context(pformat)  # pyrefly: ignore[unsupported-operation]\n    self.environment.globals['warning'] = warning\n    self.environment.globals['accesskey'] = pass_context(accesskey)  # pyrefly: ignore[unsupported-operation]\n    self.environment.globals['idgen'] = idgen  # pyrefly: ignore[unsupported-operation]\n    if use_i18n:\n        # ``install_gettext_translations`` is injected by the ``jinja2.ext.i18n`` extension\n        self.environment.install_gettext_translations(builder._translator)  # type: ignore[attr-defined]  # ty: ignore[unresolved-attribute]\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, Jinja2",
      "display": "jinja2glue.py · init()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, Jinja2",
      "display": "sphinx-doc/sphinx",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, sphinx-doc/sphinx",
      "display": "8.1K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, sphinx-doc/sphinx",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F27": {
      "label": "Library name, Mako",
      "display": "Mako",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, Mako",
      "display": "229.0M",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "License, Mako",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, Mako",
      "display": "1.4.3, Sep 2026",
      "asOf": "2026-09-22"
    },
    "F31": {
      "label": "Package release date, Mako",
      "display": "Sep 2026",
      "asOf": "2026-09-22"
    },
    "F32": {
      "label": "Repository stars, Mako",
      "display": "463",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Template inheritance, Mako",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Automatic escaping, Mako",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Filesystem loader, Mako",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Output formats, Mako",
      "display": "HTML, XML, Text",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, Mako",
      "display": "pip install Mako",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, Mako",
      "display": "Compiles text templates containing expressions and Python blocks into reusable Python modules.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, Mako",
      "display": "Uses Python inside templates",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, Mako",
      "display": "Write Python expressions and control statements directly in template source.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, Mako",
      "display": "Renders into a supplied buffer",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, Mako",
      "display": "Provide a rendering Context backed by a caller-owned text buffer.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, Mako",
      "display": "HTML escaping needs configuration",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, Mako",
      "display": "Configure expression filters to escape rendered HTML values.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, Mako",
      "display": "Template code runs as Python",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, Mako",
      "display": "Template authors can include arbitrary Python statements.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Quickstart, Mako",
      "display": "from mako.template import Template\nfrom mako.runtime import Context\nfrom io import StringIO\n\nmytemplate = Template(\"hello, ${name}!\")\nbuf = StringIO()\nctx = Context(buf, name=\"jack\")\nmytemplate.render_context(ctx)\nprint(buf.getvalue())\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function, Mako",
      "display": "def template_to_file(\n    template_file: str | os.PathLike[str],\n    dest: str | os.PathLike[str],\n    output_encoding: str,\n    *,\n    append_with_newlines: bool = False,\n    **kw: Any,\n) -> None:\n    template = Template(filename=_preserving_path_as_str(template_file))\n    try:\n        output = template.render_unicode(**kw).encode(output_encoding)\n    except:\n        with tempfile.NamedTemporaryFile(suffix=\".txt\", delete=False) as ntf:\n            ntf.write(\n                exceptions.text_error_template()\n                .render_unicode()\n                .encode(output_encoding)\n            )\n            fname = ntf.name\n        raise CommandError(\n            \"Template rendering failed; see %s for a \"\n            \"template-oriented traceback.\" % fname\n        )\n    else:\n        with open(dest, \"ab\" if append_with_newlines else \"wb\") as f:\n            if append_with_newlines:\n                f.write(\"\\n\\n\".encode(output_encoding))\n            f.write(output)\n",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project function reference, Mako",
      "display": "pyfiles.py · template_to_file()",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project repository, Mako",
      "display": "sqlalchemy/alembic",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project stars, sqlalchemy/alembic",
      "display": "4.5K",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Project push date, sqlalchemy/alembic",
      "display": "Oct 2026",
      "asOf": "2026-10-30"
    },
    "F53": {
      "label": "Library name, tornado",
      "display": "Tornado templates",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Monthly downloads, tornado",
      "display": "119.9M",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "License, tornado",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Package release, tornado",
      "display": "6.6.1, Nov 2026",
      "asOf": "2026-11-09"
    },
    "F57": {
      "label": "Package release date, tornado",
      "display": "Nov 2026",
      "asOf": "2026-11-09"
    },
    "F58": {
      "label": "Repository stars, tornado",
      "display": "22.2K",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Template inheritance, tornado",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Automatic escaping, tornado",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Filesystem loader, tornado",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "Output formats, tornado",
      "display": "HTML, Text",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "Install, tornado",
      "display": "pip install tornado",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "What it does, tornado",
      "display": "Compiles templates to Python and generates output through a standalone module or web handlers.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, tornado",
      "display": "Uses familiar Python expressions",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, tornado",
      "display": "Use Python expressions directly in conditions, loops, and substitutions.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "strengths lead, tornado",
      "display": "Escapes expression output",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "strengths, tornado",
      "display": "Automatic escaping applies to expression output, rather than other directives.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, tornado",
      "display": "Templates execute server-side Python",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, tornado",
      "display": "Template authors can execute arbitrary code in the server process.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "limitations lead, tornado",
      "display": "Rendered output is bytes",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "limitations, tornado",
      "display": "Decode generated bytes when an integration expects text.",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Quickstart, tornado",
      "display": "from tornado import escape, gen, httputil, iostream, locale, template\n\nt = template.Template(\"<html>{{ myvalue }}</html>\")\nprint(t.generate(myvalue=\"XXX\"))\n\n",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project function, tornado",
      "display": "@tornado.gen.coroutine\ndef template(content, handler=None, **kwargs):\n    '''Renders a file as a Tornado template in FileHandler.\n\n    This can be used as a keyword argument to FileHandler:\n\n    ```yaml\n    pattern: /file.tmpl.html\n    handler: FileHandler\n    kwargs:\n        ...\n        template: '*.tmpl.html'\n    ```\n    '''\n    name = f'{handler.name}:template'\n    loader = None\n    # If a FileHandler renders templates, cache the file, and treat handler.file as filename.\n    if handler is not None and getattr(handler, 'file', None):\n        name = str(handler.file)\n        loader = CacheLoader(os.path.dirname(str(handler.file)))\n    tmpl = tornado.template.Template(content, name=name, loader=loader)\n\n    if handler is not None:\n        for key, val in handler.get_template_namespace().items():\n            kwargs.setdefault(key, val)\n\n    # handler is added to kwargs by handler.get_template_namespace()\n    return tmpl.generate(**kwargs).decode('utf-8')\n",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project function reference, tornado",
      "display": "template.py · template()",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project repository, tornado",
      "display": "gramener/gramex",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Project stars, gramener/gramex",
      "display": "143",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Project push date, gramener/gramex",
      "display": "May 2025",
      "asOf": "2025-05-30"
    },
    "F79": {
      "label": "Library name, Chameleon",
      "display": "Chameleon",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Monthly downloads, Chameleon",
      "display": "275.6K",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "License, Chameleon",
      "display": "BSD-like (http://repoze.org/license.html)",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Package release, Chameleon",
      "display": "4.6.1, Nov 2026",
      "asOf": "2026-11-13"
    },
    "F83": {
      "label": "Package release date, Chameleon",
      "display": "Nov 2026",
      "asOf": "2026-11-13"
    },
    "F84": {
      "label": "Repository stars, Chameleon",
      "display": "190",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Template inheritance, Chameleon",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Automatic escaping, Chameleon",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "Filesystem loader, Chameleon",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Output formats, Chameleon",
      "display": "HTML, XML, Text",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "Install, Chameleon",
      "display": "pip install Chameleon",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "What it does, Chameleon",
      "display": "Renders HTML and XML page templates using attributes, expressions and reusable macros.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths lead, Chameleon",
      "display": "Fits existing HTML and XML",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths, Chameleon",
      "display": "Express document behavior through attributes within the original markup.",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "strengths lead, Chameleon",
      "display": "Escapes inserted text by default",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "strengths, Chameleon",
      "display": "Inserted text is escaped unless explicitly marked as structure.",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations lead, Chameleon",
      "display": "Expressions run without a sandbox",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "limitations, Chameleon",
      "display": "Python expressions execute without a built-in security apparatus.",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "limitations lead, Chameleon",
      "display": "Reloading adds a runtime cost",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "limitations, Chameleon",
      "display": "Automatic reload trades rendering performance for template-change detection.",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Quickstart, Chameleon",
      "display": "from chameleon import PageTemplate\ntemplate = PageTemplate(\"<div>Hello, ${name}.</div>\")\n\ntemplate(name='John')\n",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Project function, Chameleon",
      "display": "def render(template_file: str, **template_data) -> str:\n    \"\"\"\n    Render a template to a string using the configured engine.\n\n    Example::\n\n        html = fastapi_chameleon.engine.render('email/welcome.pt', name='Sam')\n\n    :param str template_file: The Chameleon template file to render (path relative to\n        the template folder).\n    :param template_data: Keyword arguments passed to the template as variables.\n    :return: The rendered template as a UTF-8 string.\n    :raises FastAPIChameleonException: If ``global_init()`` has not been called.\n    \"\"\"\n    if not __templates:\n        raise FastAPIChameleonException('You must call global_init() before rendering templates.')\n\n    page: PageTemplate = __templates[template_file]\n    return page.render(encoding='utf-8', **template_data)\n",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Project function reference, Chameleon",
      "display": "engine.py · render()",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Project repository, Chameleon",
      "display": "mikeckennedy/fastapi-chameleon",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Project stars, mikeckennedy/fastapi-chameleon",
      "display": "224",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Project push date, mikeckennedy/fastapi-chameleon",
      "display": "Nov 2026",
      "asOf": "2026-11-07"
    },
    "F105": {
      "label": "Developer need",
      "display": "Sharing parent page layouts",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Why choose Jinja2",
      "display": "overridable layout blocks",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need in introduction",
      "display": "sharing parent page layouts",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "When to consider Chameleon",
      "display": "template behavior should stay in HTML attributes",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need",
      "display": "Using Python expressions and blocks",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Why choose Mako",
      "display": "Python-native template expressions",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Developer need in introduction",
      "display": "using Python expressions and blocks",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "When to consider Jinja2",
      "display": "native asynchronous rendering is required",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Developer need",
      "display": "Keeping dynamic behavior in markup",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "Why choose Chameleon",
      "display": "attribute-based document templates",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "Developer need in introduction",
      "display": "keeping dynamic behavior in markup",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "When to consider Jinja2",
      "display": "shared parent layouts are preferred",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "Developer need",
      "display": "Reusing Python in Tornado views",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "Why choose tornado",
      "display": "native Python template expressions",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "Developer need in introduction",
      "display": "reusing Python in Tornado views",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "When to consider Mako",
      "display": "rendering into a supplied text buffer is useful",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "Page introduction",
      "display": "Python template engine libraries let application developers render documents from templates and data.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Is Jinja autoescaping enabled by default?",
      "display": "Autoescaping is supported but must be configured explicitly.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Can a Jinja sandbox replace resource limits?",
      "display": "Resource limits are still needed to contain excessive CPU or memory usage.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Does Mako support Python expressions inside templates?",
      "display": "Expression contents are evaluated directly by Python.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: How does Mako apply HTML escaping globally?",
      "display": "A page expression_filter can apply the HTML escape filter to expression output.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Can Chameleon extend reusable layouts?",
      "display": "METAL extend-macro extends a base macro and overrides its slots.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Does Chameleon sandbox Python expressions?",
      "display": "Python expressions execute natively without built-in security apparatus.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: Does an asynchronous web handler make its renderer asynchronous?",
      "display": "Jinja explicitly supplies a native asynchronous render method.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "FAQ: Does an asynchronous web handler make its renderer asynchronous?",
      "display": "Tornado template generation returns bytes; its renderer API is separate from handler scheduling.",
      "asOf": "2026-11-17"
    },
    "F130": {
      "label": "FAQ: What does Tornado template generation return?",
      "display": "The generate method returns bytes.",
      "asOf": "2026-11-17"
    },
    "F131": {
      "label": "FAQ: Does Mako always return a string?",
      "display": "Mako render returns bytes when output_encoding is set, otherwise a string.",
      "asOf": "2026-11-17"
    },
    "F132": {
      "label": "FAQ: When does Chameleon need an explicit structure marker?",
      "display": "Use structure to insert markup without the default escaping.",
      "asOf": "2026-11-17"
    },
    "F133": {
      "label": "FAQ: Do Tornado inheritance and includes need a loader?",
      "display": "A template loader is required for extends and include constructs.",
      "asOf": "2026-11-17"
    },
    "F134": {
      "label": "FAQ: Does Chameleon automatic reload affect performance?",
      "display": "Automatic reload carries a performance cost and is intended mainly for development.",
      "asOf": "2026-11-17"
    },
    "F135": {
      "label": "Library name, jinja2",
      "display": "Jinja",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Monthly downloads, jinja2",
      "display": "721.2M",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "License, jinja2",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Package release, jinja2",
      "display": "3.1.6",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Package release date, jinja2",
      "display": "Mar 2025",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Install, jinja2",
      "display": "python3.13 -m pip install jinja2==3.1.6",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Quickstart, jinja2",
      "display": "from jinja2 import Environment\n\nenvironment = Environment()\ntemplate = environment.from_string(\"Hello, {{ name }}!\")\nprint(template.render(name=\"World\"))",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Official description, jinja2",
      "display": "Renders templates with an expressive syntax.",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Quickstart source file, jinja2",
      "display": "api.html",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Native async rendering, jinja2",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Autoescape enabled by default, jinja2",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Native language and integration role, jinja2",
      "display": "General standalone template engine with loaders, macros, inheritance, optional async rendering, and separate sandbox environment. HTML autoescape must be configured explicitly.",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Original workflow/current API boundary, jinja2",
      "display": "Sphinx directly imports SandboxedEnvironment and pass_context. Current3.1.6 environment accepts a loader object and extensions; Sphinx loader implements get_source. pass_context decorates the actual two context helpers. Only when builder._translator exists does the function enable jinja2.ext.i18n, which injects the documented install_gettext_translations method. No dynamic attribute is invented without its extension. Original theme/config/path loaders, filters, and helper functions remain host context; init configures an environment rather than rendering HTML by itself.",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Library name, mako",
      "display": "Mako",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Monthly downloads, mako",
      "display": "237.1M",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "License, mako",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Package release, mako",
      "display": "1.4.3",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Package release date, mako",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Install, mako",
      "display": "python3.13 -m pip install mako==1.4.3",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Quickstart, mako",
      "display": "from mako.template import Template\n\ntemplate = Template(\"hello world!\")\nprint(template.render())",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Official description, mako",
      "display": "Provides a templating language.",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Quickstart source file, mako",
      "display": "usage.html",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Native async rendering, mako",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Autoescape enabled by default, mako",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Native language and integration role, mako",
      "display": "Templates with embedded Python expressions/code and inheritance; Alembic uses it to generate migration files. HTML escaping is an explicit filter/default-filter configuration.",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Original workflow/current API boundary, mako",
      "display": "Alembic imports Template from mako.template and exceptions from mako. Current1.4.3 supports filename as a string, render_unicode(**kw), exceptions.text_error_template(), and rendering that diagnostic Template to Unicode. The original host converts PathLike to str, encodes the returned text itself, optionally appends newlines, and writes a named diagnostic file after an exception. Encoding/file/tempfile operations are not extra native template calls. Broad original except behavior is retained unchanged; no migration, file output, or captured module executed.",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Project function, mako",
      "display": "def template_to_file(\n    template_file: str | os.PathLike[str],\n    dest: str | os.PathLike[str],\n    output_encoding: str,\n    *,\n    append_with_newlines: bool = False,\n    **kw: Any,\n) -> None:\n    template = Template(filename=_preserving_path_as_str(template_file))\n    try:\n        output = template.render_unicode(**kw).encode(output_encoding)\n    except:\n        with tempfile.NamedTemporaryFile(suffix=\".txt\", delete=False) as ntf:\n            ntf.write(\n                exceptions.text_error_template()\n                .render_unicode()\n                .encode(output_encoding)\n            )\n            fname = ntf.name\n        raise CommandError(\n            \"Template rendering failed; see %s for a \"\n            \"template-oriented traceback.\" % fname\n        )\n    else:\n        with open(dest, \"ab\" if append_with_newlines else \"wb\") as f:\n            if append_with_newlines:\n                f.write(\"\\n\\n\".encode(output_encoding))\n            f.write(output)",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Project source file, mako",
      "display": "alembic/util/pyfiles.py",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Project full_name, mako",
      "display": "sqlalchemy/alembic",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Project stargazers_count, mako",
      "display": "4.5K",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Library name, tornado",
      "display": "Tornado",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Monthly downloads, tornado",
      "display": "123.2M",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "License, tornado",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Package release, tornado",
      "display": "6.6.1",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Package release date, tornado",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Install, tornado",
      "display": "python3.13 -m pip install tornado==6.6.1",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Quickstart, tornado",
      "display": "from tornado.template import Template\n\ntemplate = Template(\"Hello {{ name }}!\")\nprint(template.generate(name=\"World\"))",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Native async rendering, tornado",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Autoescape enabled by default, tornado",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Native language and integration role, tornado",
      "display": "Tornado native template engine with arbitrary Python expressions and statements; generate returns bytes synchronously even inside async web handlers.",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Original workflow/current API boundary, tornado",
      "display": "Gramex directly imports tornado.template. Current6.6.1 Template supports content,name,and optional Loader; generate(**kwargs) returns bytes, followed by original UTF-8 decode. The gen.coroutine decorator is still documented but does not make generate asynchronous; the function has no yield. Its optional CacheLoader subclass uses retained current Loader root/templates/lock/resolve_path/_create_template surface, as checked against exact6.6.1 source; protected override ownership is disclosed rather than called a stable public extension promise. Handler namespace, Gramex cache helper, file path, and loader are original host requirements. SDK2 template call sites count independently of decorator or application helpers.",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Library name, django",
      "display": "Django",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Monthly downloads, django",
      "display": "52.2M",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "License, django",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Package release, django",
      "display": "6.1.3",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Package release date, django",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Install, django",
      "display": "python3.13 -m pip install django==6.1.3",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Quickstart, django",
      "display": "from django.template import Context, Engine\n\nengine = Engine()\ntemplate = engine.from_string(\"Hello {{ name }}!\")\nprint(template.render(Context({\"name\": \"World\"})))",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Official description, django",
      "display": "Provides a high-level Python web framework.",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Quickstart source file, django",
      "display": "api/index.html",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Native async rendering, django",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Autoescape enabled by default, django",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Native language and integration role, django",
      "display": "Django Template Language plus configured template backend/loaders, contexts, and custom tags/filters; framework settings and alternate backend APIs have distinct context contracts.",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Original workflow/current API boundary, django",
      "display": "Historical Wagtail5.2 Component imports Context and django.template.loader.get_template. Current6.1 supports the unchanged Context constructor and backend-agnostic get_template API. Its returned backend Template.render takes a context dict, unlike low-level django.template.Template.render(Context). Configured TEMPLATES and a real template_name are required host context; get_context_data is a Wagtail helper and not counted. This demonstrates the Django loader/backend integration and does not prove that the selected backend is necessarily DTL rather than a configured alternative.",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Project function, django",
      "display": "def render_html(self, parent_context: MutableMapping[str, Any] = None) -> str:\n    if parent_context is None:\n        parent_context = Context()\n    context_data = self.get_context_data(parent_context)\n    if context_data is None:\n        raise TypeError(\"Expected a dict from get_context_data, got None\")\n\n    template = get_template(self.template_name)\n    return template.render(context_data)",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Project source file, django",
      "display": "wagtail/admin/ui/components.py",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Project full_name, django",
      "display": "wagtail/wagtail",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Project stargazers_count, django",
      "display": "20.7K",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Library name, chevron",
      "display": "Chevron",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Monthly downloads, chevron",
      "display": "14.0M",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "License, chevron",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Package release, chevron",
      "display": "0.14.0",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Package release date, chevron",
      "display": "Jan 2021",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Install, chevron",
      "display": "python3.13 -m pip install chevron==0.14.0",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Quickstart, chevron",
      "display": "import chevron\n\nprint(chevron.render(\"Hello, {{ mustache }}!\", {\"mustache\": \"World\"}))",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Official description, chevron",
      "display": "Renders Mustache templates.",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Quickstart source file, chevron",
      "display": "json",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Native async rendering, chevron",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Autoescape enabled by default, chevron",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Native language and integration role, chevron",
      "display": "Mustache renderer with data scopes, partials, and escaped variable interpolation; no native awaitable renderer or embedded Python template language.",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Original workflow/current API boundary, chevron",
      "display": "TinyTroupe imports actual chevron. The two original render calls pass a read UTF-8 template string and rendering-config dict, both supported by current0.14.0 README and native render signature. System template is required and user template is conditional; they are two native source sites, not two calls guaranteed on every invocation. Original package-relative prompt paths, replacement decoding, optional base folder, and mutable default dict are preserved. This function composes text messages only; no model call is part of the selected function.",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Project function, chevron",
      "display": "def compose_initial_LLM_messages_with_templates(\n    system_template_name: str,\n    user_template_name: str = None,\n    base_module_folder: str = None,\n    rendering_configs: dict = {},\n) -> list:\n    \"\"\"\n    Composes the initial messages for the LLM model call, under the assumption that it always involves\n    a system (overall task description) and an optional user message (specific task description).\n    These messages are composed using the specified templates and rendering configurations.\n    \"\"\"\n\n    # ../ to go to the base library folder, because that's the most natural reference point for the user\n    if base_module_folder is None:\n        sub_folder = \"../prompts/\"\n    else:\n        sub_folder = f\"../{base_module_folder}/prompts/\"\n\n    base_template_folder = os.path.join(os.path.dirname(__file__), sub_folder)\n\n    system_prompt_template_path = os.path.join(\n        base_template_folder, f\"{system_template_name}\"\n    )\n    user_prompt_template_path = os.path.join(\n        base_template_folder, f\"{user_template_name}\"\n    )\n\n    messages = []\n\n    messages.append(\n        {\n            \"role\": \"system\",\n            \"content\": chevron.render(\n                open(\n                    system_prompt_template_path, \"r\", encoding=\"utf-8\", errors=\"replace\"\n                ).read(),\n                rendering_configs,\n            ),\n        }\n    )\n\n    # optionally add a user message\n    if user_template_name is not None:\n        messages.append(\n            {\n                \"role\": \"user\",\n                \"content\": chevron.render(\n                    open(\n                        user_prompt_template_path,\n                        \"r\",\n                        encoding=\"utf-8\",\n                        errors=\"replace\",\n                    ).read(),\n                    rendering_configs,\n                ),\n            }\n        )\n    return messages",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Project source file, chevron",
      "display": "tinytroupe/utils/llm.py",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Project full_name, chevron",
      "display": "microsoft/TinyTroupe",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Project stargazers_count, chevron",
      "display": "7.7K",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Library name, bottle",
      "display": "bottle",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Monthly downloads, bottle",
      "display": "9.6M",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "License, bottle",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Package release, bottle",
      "display": "0.13.4",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Package release date, bottle",
      "display": "Jun 2025",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Install, bottle",
      "display": "python3.13 -m pip install bottle==0.13.4",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Quickstart, bottle",
      "display": "from bottle import SimpleTemplate\n\ntemplate = SimpleTemplate(\"Hello {{name}}!\")\nprint(template.render(name=\"World\"))",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Official description, bottle",
      "display": "Runs small web applications on WSGI.",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Quickstart source file, bottle",
      "display": "stpl.html",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Native async rendering, bottle",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Autoescape enabled by default, bottle",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Native language and integration role, bottle",
      "display": "Bottle SimpleTemplate can also run standalone; templates compile and execute Python, with escaped variables and include/rebase helpers.",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Original workflow/current API boundary, bottle",
      "display": "AIDE imports SimpleTemplate from bottle and compiles about/privacy file contents into two native template instances. Nested original route functions call those exact instances.render(version=AIDE_VERSION), supported by0.13.4. Whole _initBottle retains route registration and other static-file endpoints; app helpers, JSON reads, and routes are not needed to inflate the two direct native constructors. AIDE_VERSION, working-directory template files, existing Bottle app, and original routing host are prerequisites. No server, template bytecode, file, requests import, or application code ran.",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Project function, bottle",
      "display": "def _initBottle(self):\n\n    @self.app.route('/version')\n    def aide_version():\n        return AIDE_VERSION\n\n\n    @self.app.route('/favicon.ico')\n    def favicon():\n        return static_file('favicon.ico', root='modules/StaticFiles/static/img')\n\n    with open(os.path.abspath(os.path.join('modules/StaticFiles/static/templates/about.html')), 'r', encoding='utf-8') as f:\n        self.aboutPage = SimpleTemplate(f.read())\n\n    with open(os.path.abspath(os.path.join('modules/StaticFiles/static/templates/privacy.html')), 'r', encoding='utf-8') as f:\n        self.privacyPage = SimpleTemplate(f.read())\n\n    @self.app.route('/about')\n    @self.app.route('/<project>/about')\n    def about(project=None):\n        return self.aboutPage.render(version=AIDE_VERSION)\n\n\n    @self.app.route('/privacy')\n    @self.app.route('/<project>/privacy')\n    def privacy(project=None):\n        return self.privacyPage.render(version=AIDE_VERSION)\n\n\n    @self.app.get('/getBackdrops')\n    def get_backdrops():\n        try:\n            return {'info': json.load(open('modules/StaticFiles/static/img/backdrops/backdrops.json', 'r'))}\n        except:\n            abort(500)\n\n\n    @self.app.route('/static/<module>/<filename:re:.*>')\n    def send_static(module, filename):\n        return static_file(filename, self.MODULE_ROUTINGS[module])\n\n    #TODO: can be removed\n    @self.app.route('/<project>/static/<module>/<filename:re:.*>')\n    def send_static_proj(project, module, filename):\n        return send_static(module, filename)",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Project source file, bottle",
      "display": "modules/StaticFiles/app.py",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Project full_name, bottle",
      "display": "microsoft/aerial_wildlife_detection",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Project stargazers_count, bottle",
      "display": "250",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Library name, pystache",
      "display": "Pystache",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Monthly downloads, pystache",
      "display": "3.6M",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "License, pystache",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Package release, pystache",
      "display": "0.6.8",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Package release date, pystache",
      "display": "Mar 2025",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Install, pystache",
      "display": "python3.13 -m pip install pystache==0.6.8",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Quickstart, pystache",
      "display": "import pystache\n\nprint(pystache.render(\"Hi {{person}}!\", {\"person\": \"Mom\"}))",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Official description, pystache",
      "display": "Renders Mustache templates in Python.",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Quickstart source file, pystache",
      "display": "README.rst",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Native async rendering, pystache",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Autoescape enabled by default, pystache",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Native language and integration role, pystache",
      "display": "Mustache renderer with Renderer contexts, partials, configurable missing-tag handling, and default HTML escaping; template logic belongs in host data/objects.",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Original workflow/current API boundary, pystache",
      "display": "Redash imports actual pystache, constructs Renderer() with its current0.6.8 default escape policy, and calls its public render(template,context,**kwargs). Current Renderer accepts multiple context objects and keyword overrides and returns text. The three-line whole integration function has two native calls and is retained intact; no wrapper is invented. The adjacent different function explicitly disables escaping and is not combined or counted as a second project. This basic adapter is an actual Redash integration, not a claim its SQL/HTML context is automatically safe.",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Project function, pystache",
      "display": "def mustache_render_escape(template, context=None, **kwargs):\n    renderer = pystache.Renderer()\n    return renderer.render(template, context, **kwargs)",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Project source file, pystache",
      "display": "redash/utils/__init__.py",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Project full_name, pystache",
      "display": "getredash/redash",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Project stargazers_count, pystache",
      "display": "28.9K",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Library name, python-liquid",
      "display": "Python Liquid",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Monthly downloads, python-liquid",
      "display": "2.2M",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "License, python-liquid",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Package release, python-liquid",
      "display": "3.0.0",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Package release date, python-liquid",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Install, python-liquid",
      "display": "python3.13 -m pip install python-liquid==3.0.0",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Quickstart, python-liquid",
      "display": "import liquid\n\nprint(liquid.render(\"Hello, {{ you }}!\", {\"you\": \"World\"}))",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Official description, python-liquid",
      "display": "Renders Liquid templates in Python.",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Quickstart source file, python-liquid",
      "display": "index.html",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Native async rendering, python-liquid",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Autoescape enabled by default, python-liquid",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Native language and integration role, python-liquid",
      "display": "Liquid3 templates with sync/async rendering, configured loaders/filters, resource-limit options, and opt-in HTML escaping; parse/render APIs replace older from_string and kwargs-based workflows.",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python template engines Jinja Mako Chameleon Tornado code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
