Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Jinja2 Extension for Python Import

Project description

Jinja2 Extension for Python Import keywords

So we don’t have to write a new jinja2 filter just for simple function.

It exposed a powerful weapon for shoot you feet, use it in your own risk!

Usage

Execute “echo hello” shell command and get the output

from jinja2 import Environment

env = Environment(extensions=['jinja2_pimport.PImportExtension'])
template = env.from_string("{{ ('subprocess'|pimport).check_output('echo hello', shell=True).strip().decode() }}")
template.render()
# => hello

License

Distributed under the terms of the MIT license, jinja2-pimport is free and open source software

OSI certified

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
jinja2-pimport-0.1.8.tar.gz (3.5 kB) Copy SHA256 hash SHA256 Source None Apr 6, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page