A Jinja2 extenstion that adds python version to templates.
Project description
A Jinja extenstion that creates a global variable with Python version information for your Jinja2 templates:
Usage
$ pip install jinja2-python-version
from jinja2 import Environment
env = Environment(extensions=['jinja2_python_version.PythonVersionExtension'])
# 3.6
template = env.from_string("{{ python_version }}")
# 3.6
template = env.from_string("{{ python_version.minor }}")
# 3
template = env.from_string("{{ python_version.major }}")
# 3.6.4
template = env.from_string("{{ python_version.micro }}")
template.render()
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
Built Distribution
Close
Hashes for jinja2-python-version-1.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9842720b2e046ea2f7cea4ee1687cb1bf4947fb231a0db45490bd3907236237 |
|
MD5 | b7b4dd6d1fd12f33f71eb6049da720d5 |
|
BLAKE2b-256 | 9e5fc0c8626ebb742ac4f1f8156d5b946159f4aaac23448352f167c470d18a37 |
Close
Hashes for jinja2_python_version-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9154174e954d094c43346a80e14411f70f17ec9b428b24fafff33e7a62e7efc1 |
|
MD5 | efe110c441b74756e36e7dfb126b822b |
|
BLAKE2b-256 | 831dffdaed665307621c4676a8c36cd5d22220a13e2795e4db33217841caa994 |