Jinja2 Python Version
A Jinja extension that creates a global variable with Python version information for your Jinja2 templates:
Compatible with Jinja2 versions 2.x and 3.x.
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()
Metadata
Release files for jinja2-python-version 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jinja2_python_version-1.2.0.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jinja2_python_version-1.2.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 6.4 kB
Release files / jinja2_python_version-1.2.0.tar.gz
| Download URL | jinja2_python_version-1.2.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2cd7da29f32763e61dfe853185e011e8b4fd6dcd1b4fa8d74f7657722c6a28e
|
|
BLAKE2b-256 checksum How to use checksums |
ebcf3829ef29d5d3a8bf86c93be871706f394927243b621b50ef68fa638aa732
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.9 Darwin/22.2.0
|
Release files / jinja2_python_version-1.2.0-py2.py3-none-any.whl
| Download URL | jinja2_python_version-1.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4c9e251c7d42c8220d512f1f575373a8e521e97f7c8409e1f7a33af07a33f478
|
|
BLAKE2b-256 checksum How to use checksums |
6be7fe284c3e3de2001ef52dd1e2ead2d89c2506c0f4d4b198c3a8bbe61df7ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.10.9 Darwin/22.2.0
|