{"id":23676,"library":"envtpl","title":"envtpl","description":"Render Jinja2 templates on the command line using shell environment variables. Installed as a CLI tool, it reads a template file, substitutes variables from the environment, and outputs the result. Current version 0.8.0 (2025-03-21) drops Python 2 support and requires Python >=3.10.","status":"active","version":"0.8.0","language":"python","source_language":"en","source_url":"https://github.com/andreasjansson/envtpl","tags":["jinja2","templating","cli","environment-variables"],"install":[{"cmd":"pip install envtpl","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"template engine","package":"jinja2","optional":false}],"imports":[{"note":"envtpl is a CLI tool; importing its internals is unsupported. Use subprocess or shell.","wrong":"from envtpl import render_template","symbol":"envtpl","correct":"import envtpl"}],"quickstart":{"code":"echo 'Hello {{ NAME }}' > template.j2\nNAME=World envtpl < template.j2\n# Output: Hello World","lang":"python","description":"Create a Jinja2 template and render it with envtpl, passing environment variables."},"warnings":[{"fix":"Upgrade to Python 3.10+.","message":"Python 2 dropped in 0.8.0. Requires Python >=3.10.","severity":"breaking","affected_versions":">=0.8.0"},{"fix":"Use `envtpl -u template.j2` to suppress errors for undefined variables.","message":"Undefined variables raise an error by default; use `-u` flag to allow undefined variables.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `envtpl < template.j2` or `cat template.j2 | envtpl`. Do not omit the `<` or pipe.","message":"Template file must be passed via stdin or as argument; redirect or pipe carefully.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Provide input: `envtpl < mytemplate.j2` or `echo '...' | envtpl`.","cause":"Running `envtpl` without providing a template (expects stdin or file argument).","error":"envtpl: error: argument -: expected one argument"},{"fix":"Set the variable before running: `export VARIABLE=value; envtpl template.j2`, or use `-u` flag.","cause":"Template references a variable not set in the environment.","error":"jinja2.exceptions.UndefinedError: 'VARIABLE' is undefined"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}