# jinja2_shell_extension
[//]: # (automatically generated from https://github.com/metwork-framework/github_organization_management/blob/master/common_files/README.md)
**Status (master branch)**
[](https://github.com/metwork-framework/jinja2_shell_extension/actions?query=workflow%3ACI+branch%3Amaster)
[](https://github.com/metwork-framework/resources/blob/master/badges/maintained.svg)
## What is it ?
This is a [jinja2](http://jinja.pocoo.org/) 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
```python
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, 19 Jul 2023 11:16:39 +0000
")
result = template.render()
# example: result == "Fri, 31 Jan 2020 13:35:56 +0100"
# [...]
```
## Contributing guide
See [CONTRIBUTING.md](CONTRIBUTING.md) file.
## Code of Conduct
See [CODE_OF_CONDUCT.md](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!)*
[](http://www.meteofrance.com)
Raw data
{
"_id": null,
"home_page": "https://github.com/metwork-framework/jinja2_shell_extension",
"name": "jinja2-shell-extension",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.0",
"maintainer_email": "",
"keywords": "jinja2 extension",
"author": "Fabien MARTY",
"author_email": "fabien.marty@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8a/91/e5994701b927f9b55aa3d0ba11e7c9e15ff683c0796a63e1aa2b9342fbde/jinja2_shell_extension-2.0.1.tar.gz",
"platform": null,
"description": "# jinja2_shell_extension\n\n[//]: # (automatically generated from https://github.com/metwork-framework/github_organization_management/blob/master/common_files/README.md)\n\n**Status (master branch)**\n\n\n\n[](https://github.com/metwork-framework/jinja2_shell_extension/actions?query=workflow%3ACI+branch%3Amaster)\n[](https://github.com/metwork-framework/resources/blob/master/badges/maintained.svg)\n\n\n\n\n## What is it ?\n\nThis is a [jinja2](http://jinja.pocoo.org/) extension to execute system/shell\ncommands from a template.\n\n**WARNING: be sure to valid any string submitted to this filter as you can\nopen security holes with it**\n\n## Syntax\n\nThe syntax is `'full_command_with_args'|shell([die_on_error_boolean_flag], [encoding])`.\n\n## Example\n\n```python\n\nfrom jinja2 import Template, Environment\n\n# We load the extension in a jinja2 Environment\nenv = Environment(extensions=[\"jinja2_shell_extension.ShellExtension\"])\n\n# For the example, we use a template from a simple string\ntemplate = env.from_string(\"Wed, 19 Jul 2023 11:16:39 +0000\n\")\nresult = template.render()\n\n# example: result == \"Fri, 31 Jan 2020 13:35:56 +0100\"\n# [...]\n\n```\n\n\n\n\n\n\n## Contributing guide\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) file.\n\n\n\n## Code of Conduct\n\nSee [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) file.\n\n\n\n## Sponsors\n\n*(If you are officially paid to work on MetWork Framework, please contact us to add your company logo here!)*\n\n[](http://www.meteofrance.com)\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "a jinja2 extension to access to system environment variables",
"version": "2.0.1",
"project_urls": {
"Homepage": "https://github.com/metwork-framework/jinja2_shell_extension"
},
"split_keywords": [
"jinja2",
"extension"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aa2c37abfcbbf33f6bd335be2c7a68fbc0cfa9d3f7b2bc58d53e907deb563072",
"md5": "cc2bf66eb300bdb413751020d29dab7e",
"sha256": "e3b1b514af64fb0610ac5391c670932105bab33b889d6ea2dce5192e1b10cda5"
},
"downloads": -1,
"filename": "jinja2_shell_extension-2.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cc2bf66eb300bdb413751020d29dab7e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.0",
"size": 3715,
"upload_time": "2023-07-19T11:27:23",
"upload_time_iso_8601": "2023-07-19T11:27:23.336585Z",
"url": "https://files.pythonhosted.org/packages/aa/2c/37abfcbbf33f6bd335be2c7a68fbc0cfa9d3f7b2bc58d53e907deb563072/jinja2_shell_extension-2.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8a91e5994701b927f9b55aa3d0ba11e7c9e15ff683c0796a63e1aa2b9342fbde",
"md5": "6e4c91e67f09bcf48489bcb9dc92a620",
"sha256": "0512f0ec9e7b73aac3df034e452de7438825347c2f5b59825962cad549a7ac0e"
},
"downloads": -1,
"filename": "jinja2_shell_extension-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "6e4c91e67f09bcf48489bcb9dc92a620",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.0",
"size": 3480,
"upload_time": "2023-07-19T11:27:24",
"upload_time_iso_8601": "2023-07-19T11:27:24.803537Z",
"url": "https://files.pythonhosted.org/packages/8a/91/e5994701b927f9b55aa3d0ba11e7c9e15ff683c0796a63e1aa2b9342fbde/jinja2_shell_extension-2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-19 11:27:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "metwork-framework",
"github_project": "jinja2_shell_extension",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "jinja2-shell-extension"
}