Skip to main content

Jinja2 extension to handle git-specific things

Project description

https://travis-ci.org/sobolevn/jinja2-git.svg?branch=master https://coveralls.io/repos/github/sobolevn/jinja2-git/badge.svg?branch=master https://badge.fury.io/py/jinja2-git.svg https://img.shields.io/pypi/pyversions/jinja2-git.svg

Reasoning

This pligin 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

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.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distributions

jinja2_git-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

jinja2_git-0.1.0-py2.py3-none-any.whl (3.9 kB view details)

Uploaded Python 2 Python 3

jinja2_git-0.1.0-py2-none-any.whl (3.9 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: jinja2-git-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jinja2-git-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f0e59b6dcee4762c02fc3adc58065220eaed67e5393d42591fb4ed9fbd2b49d7
MD5 783b00be43fff1955e5b9d130c0649c2
BLAKE2b-256 266b8d3837c2d58bc3dae4e4433818177bf708a2c8fe2416cf89243a83541eff

See more details on using hashes here.

File details

Details for the file jinja2_git-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jinja2_git-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 219d6b414420a63ab4367b897c40c8113c4b560102c7419a2d21e91bada4c6ee
MD5 c302d8d001d7d3e23a308b4f551fad12
BLAKE2b-256 bcb077fdbf564b3ed2c2d1e4100b0c51371a1a06dd2673a7b5c463247c2e062f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jinja2_git-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e06787b2abb3de49508bd3e71fc8328fcaddd49a821190a1cdeb83fb877ddf07
MD5 d5a73fd780509304ad060ce2704b40b6
BLAKE2b-256 5dd2a846ce400c210e2230770ce893be08d188ae12afd256583e001e2e3f9fdd

See more details on using hashes here.

File details

Details for the file jinja2_git-0.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for jinja2_git-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 509f4be8ffa6b25589574a97ce122d7eb7e7269454b713925a07d110825c5a5d
MD5 5ccd08d32d1c1e7f731a8a7dd2777d7d
BLAKE2b-256 e03aa332a6fa6cba11c16a176c65b120d16171715fa2c79d8078495fe2824229

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