Skip to main content

Jinja 2 file command line render

Project description


Pypi link

Jinja2 to file command line

$ python j2f/ --vars vars.yml deploy.yml 
Traceback (most recent call last):
  File "j2f/", line 58, in <module>
    rendered = jinja2file(args.template, template_vars)
  File "j2f/", line 43, in jinja2file
    rendered = j2_env.get_template(template_file).render(template_vars)
  File "/home/jorge/.virtualenvs/j2f/lib/python3.5/site-packages/jinja2/", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/jorge/.virtualenvs/j2f/lib/python3.5/site-packages/jinja2/", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/jorge/.virtualenvs/j2f/lib/python3.5/site-packages/jinja2/", line 37, in reraise
    raise value.with_traceback(tb)
  File "/home/j2f/deploy.yml", line 147, in top-level template code
    component_gitrevision: "{{ gitrevision }}"

then add the missing var 'component_gitrevision' to vars.yml file

- component_gitrevision: '123456'

and rerun the j2f script to render the template

build binary

For an easy way to use, a portable binary can be build using

python build

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for j2f, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size j2f-0.0.3-py3-none-any.whl (13.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size j2f-0.0.3.tar.gz (1.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page