Jinja2 Extension for getting eval() result.
Project description
jinja2-eval
Jinja2 Extension for getting eval()
result.
Installation
Install this via pip (or your favourite package manager):
pip install jinja2-eval
Usage
Basic usage:
{% eval "1 + 1" %}
{{ "1 + 1" | eval }}
2
2
Importing modules:
{% eval "exec('import math') or math.pi" %}
{{ "exec('import math') or math.pi" | eval }}
3.141592653589793
3.141592653589793
Contributors ✨
Thanks goes to these wonderful people (emoji key):
34j 💻 🤔 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jinja2_eval-0.1.1.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for jinja2_eval-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30de7d1107af882b9ca4c35e2cbe99bf6529da0fbfed2fa7ac7b9bf9a66b37ca |
|
MD5 | 21607f8ee0cd4866de5710918fc9734d |
|
BLAKE2b-256 | a906892e32ec0cb5cf593dbc746e1b599fecdfe1385d7d71fb12f48c5b72aea3 |