A JEXL parser and evaluator.
Project description
# PyJEXL
A Python-based JEXL parser and evaluator.
__NOTE:__ This library handles the "Java__Script__ Expression Language" from
[TechnologyAdvice's JEXL library][jexl]. It does __NOT__ handle the
similarly-named Apache Commons JEXL language.
[jexl]: https://github.com/TechnologyAdvice/Jexl
## 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.
A Python-based JEXL parser and evaluator.
__NOTE:__ This library handles the "Java__Script__ Expression Language" from
[TechnologyAdvice's JEXL library][jexl]. It does __NOT__ handle the
similarly-named Apache Commons JEXL language.
[jexl]: https://github.com/TechnologyAdvice/Jexl
## 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.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file pyjexl-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pyjexl-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a063d32c30c11185e1a340e79998fc3d2df3ec18007023d32b5dac0de7b38d3c |
|
MD5 | c3bc0cd7acf59ccc75ae2baa4fbb3ce2 |
|
BLAKE2b-256 | a5324d8f163a0a47f18c080ca9ca789cff3b64fbf721cd2cecc5f550c4953240 |