A JEXL parser and evaluator with extended grammar (80+ built-in functions and transforms).
Project description
PyJEXL-Extended
Python implementation of the JEXL expression language with extended grammar—over 80 built-in functions and transforms for strings, numbers, arrays, objects, dates, and more.
NOTE: This library is based on TomFrost's JEXL and extends the original mozilla/pyjexl with a rich set of features inspired by jexl-extended.
Features
- 🚀 80+ Built-in Functions & Transforms: String manipulation, math, arrays, objects, dates, and more
- 🧩 Modular Grammar: Use the entire library or import individual functions
- 🐍 Pythonic Semantics: Type-safe, predictable behavior
- 🧪 Extensible: Add your own functions, transforms, and operators
📚 Full Documentation: https://docs.konnektr.io/docs/jexl/
Quick Start
Install:
pip install pyjexl-extended
Basic usage:
from pyjexl.jexl_extended import JexlExtended
context = {
"users": [
{"name": "John", "age": 32},
{"name": "Jane", "age": 34},
{"name": "Bob", "age": 33}
]
}
jexl = JexlExtended(context)
result = jexl.eval('users|filter("value.age > 32")|map("value.name")|join(", ")')
# "Jane, Bob"
Extended Grammar Examples
- String:
"hello world"|uppercase→"HELLO WORLD" - Array:
[1,2,3]|sum→6 - Object:
{foo:1, bar:2}|keys→['foo', 'bar'] - Date:
now()→ ISO datetime string - Math:
10.123456|round(2)→10.12
See jexl-extended for the full list of available functions and transforms.
Playground
Try out expressions interactively:
Related Projects
- jexl-extended (TypeScript) — The original extended grammar for JEXL
- JexlNet (C#) — C# implementation with extended grammar
- PyJEXL (Mozilla) — Original Python JEXL parser
- jexl-rs (Rust) — Rust-based JEXL parser
License
Licensed under the MIT License. See LICENSE for details.
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
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 pyjexl_extended-0.2.2.tar.gz.
File metadata
- Download URL: pyjexl_extended-0.2.2.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7ee52b23916e8a7cc7cdf851de15acdf3570dada1b837752e51fdf03dd124c4
|
|
| MD5 |
40a9fa3823839e898cc6fe5ea688a947
|
|
| BLAKE2b-256 |
23932f60c3b0f5b70e89236c508a6cae66aa0ab13857a66940fc6be93fd414f2
|
Provenance
The following attestation bundles were made for pyjexl_extended-0.2.2.tar.gz:
Publisher:
publish-pypi.yml on konnektr-io/pyjexl-extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyjexl_extended-0.2.2.tar.gz -
Subject digest:
a7ee52b23916e8a7cc7cdf851de15acdf3570dada1b837752e51fdf03dd124c4 - Sigstore transparency entry: 777005661
- Sigstore integration time:
-
Permalink:
konnektr-io/pyjexl-extended@e81c54426bdc47e29ee947f8295dd155e4f341cd -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/konnektr-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e81c54426bdc47e29ee947f8295dd155e4f341cd -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyjexl_extended-0.2.2-py3-none-any.whl.
File metadata
- Download URL: pyjexl_extended-0.2.2-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
224486b3ad896454c37de4c6e9a405679ab95a6cbefc932e3e304d2e7f152a7a
|
|
| MD5 |
411684c8c10f67b5ffe189293f4fcc6f
|
|
| BLAKE2b-256 |
e548bda372e6d6ce9f67c26eccda0cd9feaf542859020aba366e8ceceee51147
|
Provenance
The following attestation bundles were made for pyjexl_extended-0.2.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on konnektr-io/pyjexl-extended
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyjexl_extended-0.2.2-py3-none-any.whl -
Subject digest:
224486b3ad896454c37de4c6e9a405679ab95a6cbefc932e3e304d2e7f152a7a - Sigstore transparency entry: 777005712
- Sigstore integration time:
-
Permalink:
konnektr-io/pyjexl-extended@e81c54426bdc47e29ee947f8295dd155e4f341cd -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/konnektr-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e81c54426bdc47e29ee947f8295dd155e4f341cd -
Trigger Event:
push
-
Statement type: