Skip to content

Python program that generates code from a Jinja2 template and an input YAML file

Notifications You must be signed in to change notification settings

daniel-pro/python-jinja2-template-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

Python program to generate code from Jinja2 templates

Installation

To install the latest stable release (v2.0 as of now):

wget https://github.com/daniel-pro/python-jinja2-template-generator/archive/v2.0.tar.gz
tar zxvf v2.0.tar.gz

Otherwise if you want to use the development branch (at your own risk):

git clone https://github.com/daniel-pro/python-jinja2-template-generator.git

Create the Docker container image :

cd python-jinja2-template-generator/
docker build -t dpro/ptyg:2.0 .

Run the Docker container :

docker run --rm --mount type=bind,source=/tmp,target=/app/wdir dpro/ptyg:2.0 python ptyg.py gen /app/wdir/input.yaml /app/wdir/input.template /app/wdir/output.out

Dependencies

Although you don't need them if you use the containerized version, these are the script's dependencies:

  1. pathlib
  2. pyyaml
  3. jinja2

About

Python program that generates code from a Jinja2 template and an input YAML file

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published