{"library":"minijinja","title":"MiniJinja Python Bindings","description":"MiniJinja is an experimental Python binding of the Rust MiniJinja template engine, currently at version 2.19.0. It provides a powerful, minimal dependency template engine with a high degree of compatibility with Jinja2. MiniJinja is noted for its strong sandboxing capabilities and its better positioning for future free-threaded Python adoption, though Jinja2 may perform faster on current Python 3.14 single-threaded environments. The library sees active development with frequent releases.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install minijinja"],"cli":null},"imports":["from minijinja import Environment","from minijinja import context"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from minijinja import Environment, context\n\n# Create a Jinja environment\nenv = Environment()\n\n# Add a template (can also load from files using a Loader)\nenv.add_template(\"hello.html\", \"Hello {{ name }}! Today is {{ day }}.\").unwrap()\n\n# Get the template and render it with context\ntmpl = env.get_template(\"hello.html\").unwrap()\nrendered_output = tmpl.render(context!(name => \"World\", day => \"Thursday\")).unwrap()\n\nprint(rendered_output)","lang":"python","description":"This example demonstrates how to create a MiniJinja environment, load a template from a string, and render it with a provided context using the `context!` macro for convenience.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}