New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

pyjexl

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyjexl

A JEXL parser and evaluator.

0.3.0
Maintainers
2

PyJEXL

CircleCI

A Python-based JEXL parser and evaluator.

NOTE: This library handles the JEXL from TomFrost's JEXL library. It does NOT handle the similarly-named Apache Commons JEXL language.

Limitations and Differences from JEXL

  • JavaScript-style implicit type conversions aren't supported, but may be added in the future. Instead, Python type semantics are used.
  • Property access is only supported for mapping objects currently.
  • Several odd edge-cases in JEXL are ignored because they are unintuitive, difficult to implement, or a bad pattern:
    • Implicitly using the first element in an array when chaining identifiers is not supported. In JEXL, if foo.bar is a list, the expression foo.bar.baz is equivalent to foo.bar[0].baz.
    • Conditional expressions (AKA ternary expressions) cannot have a missing consequent, i.e. "foo" ?: 4 is invalid.

License

Licensed under the MIT License. See LICENSE for details.

Keywords

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts