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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jinja2_eval-0.1.2.tar.gz.
File metadata
- Download URL: jinja2_eval-0.1.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ad72941a8882123ae3065081ee943566cee87692f9db0ff29d46c8c1e0bdbe1
|
|
| MD5 |
00218f6dd5162b365894f3a5dcc42994
|
|
| BLAKE2b-256 |
6182d8eaa433143a1e3e25c0bf04c53ee3d341e0b1033bf7a7eeb03fa187b3f6
|
File details
Details for the file jinja2_eval-0.1.2-py3-none-any.whl.
File metadata
- Download URL: jinja2_eval-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62e9a87867c5c47070be17a122ba4ea0bc65f861d3752cc993add78a388ab591
|
|
| MD5 |
36ad29d5133384fe69e3c82ac6983d59
|
|
| BLAKE2b-256 |
aad70e3edb138bd4763612642b8c195d096bc74e093b98b94ec116b2bec12415
|