Skip to main content

A CLI interface to Jinja2

Project description

$ jinja2

A CLI interface to Jinja2

Fork of jinja2-cli

Changelog

  • Add -F to read value from files

Installation

pipx

This is the recommended installation method.

$ pipx install jinja2-cli-tddschn

pip

$ pip install jinja2-cli-tddschn

Usage

Usage: jinja2 [options] <input template> <input data>

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  --format=FORMAT       format of input variables: auto, ini, json,
                        querystring, yaml, yml
  -e EXTENSIONS, --extension=EXTENSIONS
                        extra jinja2 extensions to load
  -D key=value          Define template variable in the form of key=value
  -F key=<path-to-file>, --file=key=<path-to-file>
                        Define template variable with a file content in the
                        form of key=<path-to-file>
  -s SECTION, --section=SECTION
                        Use only this section from the configuration
  --strict              Disallow undefined variables to be used within the
                        template

Optional YAML support

If PyYAML is present, you can use YAML as an input data source.

$ pip install jinja2-cli-tddschn[yaml]

Optional TOML support

If toml is present, you can use TOML as an input data source.

$ pip install jinja2-cli-tddschn[toml]

Optional XML support

If xmltodict is present, you can use XML as an input data source.

$ pip install jinja2-cli-tddschn[xml]

Optional HJSON support

If hjson is present, you can use HJSON as an input data source.

$ pip install jinja2-cli-tddschn[hjson]

Optional JSON5 support

If json5 is present, you can use JSON5 as an input data source.

$ pip install jinja2-cli-tddschn[json5]

Develop

$ git clone https://github.com/tddschn/jinja2-cli-tddschn.git
$ cd jinja2-cli-tddschn
$ poetry install

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_cli_tddschn-0.9.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

jinja2_cli_tddschn-0.9.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file jinja2_cli_tddschn-0.9.2.tar.gz.

File metadata

  • Download URL: jinja2_cli_tddschn-0.9.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.0 Darwin/23.1.0

File hashes

Hashes for jinja2_cli_tddschn-0.9.2.tar.gz
Algorithm Hash digest
SHA256 5e7f4d86446c1ac197b440aed81994b80dc1726a2ebf66c8a26a58dee1956b9e
MD5 8b94c1f40f806589bda50621a1bb098b
BLAKE2b-256 04d9735d876f205054d98f6ecd929d07b4dba56a5d08c53c9fe999a7c7c0e0e3

See more details on using hashes here.

File details

Details for the file jinja2_cli_tddschn-0.9.2-py3-none-any.whl.

File metadata

File hashes

Hashes for jinja2_cli_tddschn-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e4c570fc205a1d6b44866597c106dc4281be5bc5aa16386a7fe0b043777376bc
MD5 8d25318f30015842fe6eaccf1feddd33
BLAKE2b-256 70e4751a9d36d44ac6f6e7dbe2231135379be02e62293a4c8939b6a127279cc5

See more details on using hashes here.

Supported by

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