A Jinja2 extension that adds python version to templates.
Project description
A Jinja extension 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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b1c543c92a19cef8a43f05ba7753fbb0bec0fce809afbd8e190417861fb61fe |
|
MD5 | ed556580d1d217518684c8f623203c33 |
|
BLAKE2b-256 | c491b66b907bb1c5c41ed33d352e23057d8a14d9f302b96f4020c826cb02997a |
Close
Hashes for jinja2_python_version-1.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fde1a2ae501828572b83710e76c8e07da2a23f804bf03d863db35eebefa20975 |
|
MD5 | cac615df6a3226c1506ad6fd7981dd6c |
|
BLAKE2b-256 | debf497c11c5b9811c5e2e54623eb87c4344b8c5574e918a0e6829e7cd8254d7 |