Skip to main content

Jinja2 extension to handle git-specific things

wemake.services test codecov Python versions wemake-python-styleguide

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 cookicutter:

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

MIT

Metadata

Release files for jinja2-git 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jinja2-git 1.2.0
File Size Uploaded Provenance Actions
jinja2-git-1.2.0.tar.gz 3.6 kB Without provenance Details for jinja2-git-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jinja2-git 1.2.0
File Interpreter ABI Platform Actions
jinja2_git-1.2.0-py3-none-any.whl Python 3 none any Details for jinja2_git-1.2.0-py3-none-any.whl

Total release size: 7.1 kB

Release files / jinja2-git-1.2.0.tar.gz

Download URL jinja2-git-1.2.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
df47e7ec0dd3ca937a3f18dac4fd69eaf16675b6f63c5c95969650a02f24e639
BLAKE2b-256 checksum
How to use checksums
a21f3cfcd5cd257d7520a91f2f80f0e50a34ca89eae3621fdb146fc9c24a7d8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.8.9 Darwin/18.7.0

Release files / jinja2_git-1.2.0-py3-none-any.whl

Download URL jinja2_git-1.2.0-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b11b45ae2e8e8e3f622ef444523b3d856b3af150fa443a4ae6adeb47dfd2024
BLAKE2b-256 checksum
How to use checksums
3a061123613bb2d9df64e8aefa4e3095b9db87b9a0d258dd1e1df48c53feecd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.8.9 Darwin/18.7.0

Security for jinja2-git 1.2.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page