semvec/pypi-packages huggingface dataset:
jinja2-python-version 1.2.0
A Jinja2 extension that adds python version to templates.
License: BSD-3-Clause
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Keywords: jinja2,jinja3,extension,python,versions

=====================
Jinja2 Python Version
=====================

.. image:: https://badge.fury.io/py/jinja2-python-version.svg
    :target: https://badge.fury.io/py/jinja2-python-version

.. image:: https://app.travis-ci.com/jmfederico/jinja2-python-version.svg?branch=master
    :target: https://app.travis-ci.com/jmfederico/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
-----
.. code-block:: console

    $ pip install jinja2-python-version

.. code-block:: python

    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()