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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for jinny-1.9.4.tar.gz
Algorithm Hash digest
SHA256 b10c9011a55dddeef1ee0134387ef14ca97b60d5860d5f698ee9a0982fa44008
MD5 56e06b16193970d510f8bfc3eded6e37
BLAKE2b-256 cc95d343591cb878913aebeafdfc666f00705210f096239e3bb25908ddc362b1

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