jinja2_shell_extension
Status (master branch)
What is it ?
This is a jinja2 extension to execute system/shell commands from a template.
WARNING: be sure to valid any string submitted to this filter as you can open security holes with it
Syntax
The syntax is 'full_command_with_args'|shell([die_on_error_boolean_flag], [encoding]).
Example
from jinja2 import Template, Environment
# We load the extension in a jinja2 Environment
env = Environment(extensions=["jinja2_shell_extension.ShellExtension"])
# For the example, we use a template from a simple string
template = env.from_string("Wed, 21 May 2025 22:04:33 +0000
")
result = template.render()
# example: result == "Fri, 31 Jan 2020 13:35:56 +0100"
# [...]
Contributing guide
See CONTRIBUTING.md file.
Code of Conduct
See CODE_OF_CONDUCT.md file.
Sponsors
(If you are officially paid to work on MetWork Framework, please contact us to add your company logo here!)
Release files for jinja2-shell-extension 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jinja2_shell_extension-2.1.1.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jinja2_shell_extension-2.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / jinja2_shell_extension-2.1.1.tar.gz
| Download URL | jinja2_shell_extension-2.1.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4700d2861d76c58769cb106e36a81e8a9cf4f2ee901c24c9e193a458c7f30d9f
|
|
BLAKE2b-256 checksum How to use checksums |
efbd7c380742734e792cf33bfe103df14c0b0454ce3f7b7b24490c687f40d47b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / jinja2_shell_extension-2.1.1-py3-none-any.whl
| Download URL | jinja2_shell_extension-2.1.1-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fae7a2141f5ed12de85d14f0bfbbd2989b7c26db779e6665b692fc21fb020dcb
|
|
BLAKE2b-256 checksum How to use checksums |
160091f85dcceb09c28e112c609ba00aaff42aecaeca803f088c0ca1c67e18ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|