Skip to main content

Jinja2 Extension for getting eval() result.

Project description

jinja2-eval

CI Status Documentation Status Test coverage percentage

Poetry black pre-commit

PyPI Version Supported Python versions License

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
34j

💻 🤔 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Project details


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.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

jinja2_eval-0.1.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

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

Hashes for jinja2_eval-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9ad72941a8882123ae3065081ee943566cee87692f9db0ff29d46c8c1e0bdbe1
MD5 00218f6dd5162b365894f3a5dcc42994
BLAKE2b-256 6182d8eaa433143a1e3e25c0bf04c53ee3d341e0b1033bf7a7eeb03fa187b3f6

See more details on using hashes here.

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

Hashes for jinja2_eval-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62e9a87867c5c47070be17a122ba4ea0bc65f861d3752cc993add78a388ab591
MD5 36ad29d5133384fe69e3c82ac6983d59
BLAKE2b-256 aad70e3edb138bd4763612642b8c195d096bc74e093b98b94ec116b2bec12415

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page