{"id":27077,"library":"jnjrender","title":"jnjrender","description":"A utility to render Jinja2 templates with a YAML environment, allowing nested template rendering within rendered text. Current version 1.0.11, with no regular release cadence.","status":"active","version":"1.0.11","language":"python","source_language":"en","source_url":"https://pypi.org/project/jnjrender/","tags":["jinja2","template","yaml","rendering"],"install":[{"cmd":"pip install jnjrender","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"No known wrong import patterns","wrong":"","symbol":"render_template","correct":"from jnjrender import render_template"},{"note":"Alternative function, no common mistakes","wrong":"","symbol":"render_template_from_file","correct":"from jnjrender import render_template_from_file"}],"quickstart":{"code":"import os\nfrom jnjrender import render_template\n\ntemplate_string = \"Hello {{ name }}!\"\nenvironment = {\"name\": \"World\"}\nresult = render_template(template_string, environment)\nprint(result)\n# Output: Hello World!","lang":"python","description":"Basic rendering of a Jinja2 template string with a YAML-like environment dictionary."},"warnings":[{"fix":"Use yaml.safe_load(yaml_string) if you have a YAML file or string.","message":"The environment parameter expects a dictionary, not a YAML string. If you have a YAML string, you must parse it yourself (e.g., using PyYAML).","severity":"gotcha","affected_versions":"all"},{"fix":"Use the jinja2 library for full template support.","message":"The library does not handle template inheritance or complex Jinja2 features beyond string interpolation. For advanced Jinja2 usage, consider using jinja2 directly.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider migrating to jinja2's direct API or a more maintained alternative.","message":"The package has not been updated since 2020 (version 1.0.11) and may have unpatched security issues with Jinja2 dependencies.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install jnjrender`.","cause":"The package is not installed or the environment is misconfigured.","error":"ModuleNotFoundError: No module named 'jnjrender'"},{"fix":"Pass a dictionary as the second argument: render_template(template_string, {\"key\": \"value\"})","cause":"The environment argument (a dict) is required and was omitted.","error":"TypeError: render_template() missing 1 required positional argument: 'environment'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}