Skip to main content

j2

A simple command-line tool to render Jinja2 templates.

This script allows for rendering Jinja2 templates from a file or standard input. It can expose environment variables to the template under the 'env' namespace when the --env flag is specified.

Usage:

  1. Create a template file, e.g., 'template.j2': Hello, my name is {{ env.USER }}. I am running this on machine {{ env.HOSTNAME }}.

  2. Run the script with the template: export HOSTNAME=$(hostname) uvx --from jinja-max j2 --env -i template.j2

  3. Or using a pipe: echo "The current path is {{ env.PATH }}" | uvx --from jinja-max j2 --env

Note: Environment variable names in the template are case-sensitive. Use the exact case as shown in your environment (e.g., 'USER', 'HOME').

Metadata

Release files for jinja2-max 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jinja2-max 0.1.1
File Size Uploaded
jinja2_max-0.1.1.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jinja2-max 0.1.1
File Interpreter ABI Platform
jinja2_max-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.3 kB

Release files / jinja2_max-0.1.1.tar.gz

Download URL jinja2_max-0.1.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b2824fa01895520ebfe5b4c471ba911b20276d89da977b574d0c1b9aa75516c4
BLAKE2b-256 checksum
How to use checksums
00dddfcbd45119ebbec6d6a2f6294431498b9eeb36f818ee80f57d084738c72c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.3

Release files / jinja2_max-0.1.1-py3-none-any.whl

Download URL jinja2_max-0.1.1-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97880f0bd3eb036b1abe20330f9501fa2ab698857220fc450c6140742477b913
BLAKE2b-256 checksum
How to use checksums
9bded69ef67865770835d15be35b3a15922ab749692e56b94e024cb5015640b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.3

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page