Skip to main content

Jinja2 extension to handle git-specific things

Project description

Jinja2 extension to handle git-specific things

Travis Coveralls PyPI version Dependencies Status

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

Installation

$ pip install jinja2-git

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

jinja2-git-0.2.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

jinja2_git-0.2.0-py2.py3-none-any.whl (4.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file jinja2-git-0.2.0.tar.gz.

File metadata

  • Download URL: jinja2-git-0.2.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.11.2 CPython/3.6.5 Darwin/15.6.0

File hashes

Hashes for jinja2-git-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cba9dce285a6803d10d006b43936af7d0659d1e1e4c1be23f301dfa49a433480
MD5 bb6a423364b9ea8a1c0187ad590752a2
BLAKE2b-256 9987c6aa594c48d6f261cd97bd2fcd2ec72bf2d4e4c783e59b10c5b30286df3e

See more details on using hashes here.

File details

Details for the file jinja2_git-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: jinja2_git-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.11.2 CPython/3.6.5 Darwin/15.6.0

File hashes

Hashes for jinja2_git-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ad329ca97fadbb71745bdb1cb44f4d45c9cc53502b3edb93b32ae2ec49d5e856
MD5 c833ca468df719aa0621149eb105cf4a
BLAKE2b-256 974cf004338062eb7fab38025364713a4b7c68717f7566a6effbed8c3e8e6a51

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page