Jinja2 extension to handle git-specific things
Installation
$ pip install jinja2-git
Reasoning
This plugin is used to render commit hash in jinja2 templates. We are
using it to render our template version in cookiecutter:
Usage
Add it as an extension for jinja2 or cookiecutter.
And then inside a template:
from jinja2 import Environment
env = Environment(extensions=['jinja2_git.GitExtension'])
template = env.from_string('Commit is: {% gitcommit %}')
# => Commit is: c644682f4899d7e98147ce3a61a11bb13c52b3a0
Or short version:
from jinja2 import Environment
env = Environment(extensions=['jinja2_git.GitExtension'])
template = env.from_string('Commit is: {% gitcommit short=True %}')
# => Commit is: c644682
License
Metadata
Release files for jinja2-git 1.5.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 | Provenance | Actions |
|---|---|---|---|---|
| jinja2_git-1.5.0.tar.gz | 4.8 kB | Without provenance | Details for jinja2_git-1.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jinja2_git-1.5.0-py3-none-any.whl | Python 3 | none | any | Details for jinja2_git-1.5.0-py3-none-any.whl |
Total release size: 8.4 kB
Release files / jinja2_git-1.5.0.tar.gz
| Download URL | jinja2_git-1.5.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
81481c534f96b1754cc6f8548d0e2b6509c44a6c0915a1521ff7e43f27a7acf2
|
|
BLAKE2b-256 checksum How to use checksums |
7440dd51fedfd54cb4970ffc8abbd1dab2ab1ad9471855f0cd18ba5e4057ba32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.11.9 Darwin/24.6.0
|
Release files / jinja2_git-1.5.0-py3-none-any.whl
| Download URL | jinja2_git-1.5.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ead02fe7ec2fb4bd73cb51a44e0e5f521d816540ed8c9e3c52fa667c43a795c
|
|
BLAKE2b-256 checksum How to use checksums |
5808183402dcebf829b4dd2f8795117422cc7fe6f0d804532bda19341ab437bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.11.9 Darwin/24.6.0
|
Security for jinja2-git 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.