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

Download files

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

Source Distribution

j2f-0.0.3.tar.gz (1.6 kB view hashes)

Uploaded source

Built Distribution

j2f-0.0.3-py3-none-any.whl (13.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page