Skip to main content

A practical templating tool for Jinja templates

Project description

jinny

Jinny is a templating tool for jinja templates. It can be used for a number of things but was created from a DevOps perspective to aid in configuration management for scaled deployments instead of using tools like Helm, Kustomize, jinja-cli, etc. These days jinny is still used for Ops work but is also used for live applications handling email templating, static HTML generation and more

CLI Usage Examples


=> Templating multiple templates with a single input file:
$ jinny -t template-1.txt template-2.txt -i inputs.yml

=> Templating any number of templates with two input files where base-values.yml provides all the base values and any values in overrides.json acts as an override:
$ jinny -t template.yml -i base-values.yml overrides.json

=> Use an environment value file for templating
$ jinny -t template.yml -i ENVIRONMENT_VARIABLES.env

=> Add an explicit override via CLI argument -e
$ jinny -t template.yml -i base-values.yml -e 'image=smasherofallthings/flask-waitress:latest'

=> Add even more overrides via environment variables, so your pipelines can completely replace any bad value:
$ JINNY_overridden_value="top-priority" jinny -t template.yml -i base-values.yml overrides.json

=> Pump all your files to a single stdout stream with a separator so different files are clearly marked:
$ jinny -t template-1.yml template-2.yml -i inputs.json -s '---'

=> Dump all your templated files into a directory for capture, comparison and deployment
$ jinny -t template-1.yml template-2.yml -i inputs.json -d /path/to/directory
$ kubectl diff -f /path/to/directory
$ kubectl apply --server-dry-run -f /path/to/directory

=> Pipe jinny to kubectl directly
$ jinny -t template-1.yml -i inputs.json | kubectl apply -f -

Documentation

Jinny has a lot of functionality, settings and more. You can review the documentation at - https://jinny.southall.solutions.

The documentation is a single HTML page built with Jinny. The source code for the site is at docs/* and contains:

  • The main index.html page
  • docs/inputs/* - containing yml files that cover separate content and configuration
  • docs/partials/* - covering separate HTML parials which jinny collates into the single page
  • docs/css/* && docs/js/* - static files that jinny dynamically loads in a build time with the templating provided at index.html
  • docs/img/* - static images that jinny reads, base64 encodes and integrates directly into the HTML
  • All the other frontend stuff

The directory tree is as standard as you can expect, but with jinny's features the whole functionality is compiled and deployed into a single HTML page.

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

jinny-2.3.1.tar.gz (91.2 kB view details)

Uploaded Source

Built Distribution

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

jinny-2.3.1-py3-none-any.whl (82.3 kB view details)

Uploaded Python 3

File details

Details for the file jinny-2.3.1.tar.gz.

File metadata

  • Download URL: jinny-2.3.1.tar.gz
  • Upload date:
  • Size: 91.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for jinny-2.3.1.tar.gz
Algorithm Hash digest
SHA256 97588219f01afb759f5d1553a8d9738988dbb05bab5f68c6241b2df833947d91
MD5 2009483a54b415f7ca9447097cd5db5a
BLAKE2b-256 c8e4cdfb0bb18e3400a0dbc0ce67f19855e8fb7b4395fb48f4eccb2eeab6b718

See more details on using hashes here.

File details

Details for the file jinny-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: jinny-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 82.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for jinny-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 872809695f9bb5f62bcfbd35850ada26b86c046c6752c340c00dc76a82373782
MD5 005ced5d0002c612bda5ebec3b2aaa9f
BLAKE2b-256 1a96387b80e75b80af51b73842d3f299f8f92431743338858e5cb0c1657a1aee

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