Skip to main content

A practical templating tool for Jinja templates

Reason this release was yanked:

Bad packaging, use 1.10.1 onwards

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-1.10.0.tar.gz (25.9 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: jinny-1.10.0.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for jinny-1.10.0.tar.gz
Algorithm Hash digest
SHA256 f7d6876c26b9259cdea8c94daad3cb4acfa7a17f4d8b48df2480b03690237cc8
MD5 dc7856f42179e7c3e6fd8fb20c7d2e68
BLAKE2b-256 f86829b05ca97c3b3ec5d8ad63e7d02a270d74c4d986ef0603b54b43ba6f708d

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