Registry / devops / envtpl

envtpl

JSON →
library0.8.0pypypi✓ verified 85d ago

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.

pip install envtpl
INSTALL
IMPORT
SIG · ENVTPL
E
envtpl
devopspythonv0.8.0
Install
1.7s avg
Import
133ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.140s · 18.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.126s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

envtpl
import envtpl
from envtpl import render_template
envtpl is a CLI tool; importing its internals is unsupported. Use subprocess or shell.

Create a Jinja2 template and render it with envtpl, passing environment variables.

echo 'Hello {{ NAME }}' > template.j2 NAME=World envtpl < template.j2 # Output: Hello World
envtpl --version
Debug
Known issues
breakingPython 2 dropped in 0.8.0. Requires Python >=3.10.
fix
Upgrade to Python 3.10+.
affects: >=0.8.0
gotchaUndefined variables raise an error by default; use `-u` flag to allow undefined variables.
fix
Use `envtpl -u template.j2` to suppress errors for undefined variables.
affects: all
gotchaTemplate file must be passed via stdin or as argument; redirect or pipe carefully.
fix
Use `envtpl < template.j2` or `cat template.j2 | envtpl`. Do not omit the `<` or pipe.
affects: all
Errors
Common errors & fixes
envtpl: error: argument -: expected one argument
Running `envtpl` without providing a template (expects stdin or file argument).
fix
Provide input: `envtpl < mytemplate.j2` or `echo '...' | envtpl`.
jinja2.exceptions.UndefinedError: 'VARIABLE' is undefined
Template references a variable not set in the environment.
fix
Set the variable before running: `export VARIABLE=value; envtpl template.j2`, or use `-u` flag.
Upgrade
Version history
0.8.0latest on PyPI · released Mar 19, 2026
Audit
Dependencies
jinja2requiredtemplate engine
Agent activity
9 hits · last 30 days
node
8
Resources
envtpl — pip install envtpl · libregistry