Skip to main content

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:

  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').

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jinja2_max-0.1.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jinja2_max-0.1.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

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

Hashes for jinja2_max-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b2824fa01895520ebfe5b4c471ba911b20276d89da977b574d0c1b9aa75516c4
MD5 1b98942167d760a8f1e367462c4b50ac
BLAKE2b-256 00dddfcbd45119ebbec6d6a2f6294431498b9eeb36f818ee80f57d084738c72c

See more details on using hashes here.

File details

Details for the file jinja2_max-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jinja2_max-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97880f0bd3eb036b1abe20330f9501fa2ab698857220fc450c6140742477b913
MD5 4100c8ee4cb3b6427f99b7f9b2966162
BLAKE2b-256 9bded69ef67865770835d15be35b3a15922ab749692e56b94e024cb5015640b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page