Add your description here
Project description
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:
-
Create a template file, e.g., 'template.j2': Hello, my name is {{ env.USER }}. I am running this on machine {{ env.HOSTNAME }}.
-
Run the script with the template: export HOSTNAME=$(hostname) uvx --from jinja-max j2 --env -i template.j2
-
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').
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jinja2_max-0.1.1.tar.gz.
File metadata
- Download URL: jinja2_max-0.1.1.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2824fa01895520ebfe5b4c471ba911b20276d89da977b574d0c1b9aa75516c4
|
|
| MD5 |
1b98942167d760a8f1e367462c4b50ac
|
|
| BLAKE2b-256 |
00dddfcbd45119ebbec6d6a2f6294431498b9eeb36f818ee80f57d084738c72c
|
File details
Details for the file jinja2_max-0.1.1-py3-none-any.whl.
File metadata
- Download URL: jinja2_max-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97880f0bd3eb036b1abe20330f9501fa2ab698857220fc450c6140742477b913
|
|
| MD5 |
4100c8ee4cb3b6427f99b7f9b2966162
|
|
| BLAKE2b-256 |
9bded69ef67865770835d15be35b3a15922ab749692e56b94e024cb5015640b5
|