Registry / serialization / common-expression-language

common-expression-language

JSON →
library0.6.0pypypiunverified

Python bindings for the Common Expression Language (CEL), providing evaluation, compilation, and CLI tools. Current version 0.5.6, requires Python >=3.11. Development is active with regular releases.

pip install common-expression-language
INSTALL
IMPORT
SIG · COMMON-EXPRESSION-
C
common-expression-language
serializationpythonv0.6.0
Install
3.3s avg
Import
—
Disk
43MB
Pass rate
3/ 10
Env Coverage3 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✕ build_error
py 3.11
✕ build_error
✓ 3.2s
py 3.12
✕ build_error
✓ 3.3s
py 3.13
✕ build_error
✓ 3.5s
py 3.9
✕ build_error
✕ build_error
43MB installed
● package 43MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

evaluate
✓ from cel import evaluate
✗ from cel import evaluate

Basic usage: evaluate CEL expressions with optional context and custom functions.

from cel import evaluate # Evaluate a simple expression result = evaluate("1 + 2") print(result) # 3 # With a context context = {"age": 18} result = evaluate("age > 21", context) print(result) # False # Use custom Python functions def is_adult(age): return age > 21 context = {"is_adult": is_adult, "age": 18} result = evaluate("is_adult(age)", context) print(result) # False
cel --version
Debug
Known issues
gotchaPython types may be automatically converted to CEL types. Be cautious with dictionaries: dict subclasses are now properly handled (v0.5.6), but avoid relying on insertion order preservation in older versions.
fix
Upgrade to >=0.5.6 for dict subclass support.
affects: <0.5.6
breakingRust API breaking change in v0.5.0: cel-interpreter crate renamed to cel, function registration changed. Python API unaffected.
fix
No action needed for Python users; Rust bindings must update imports from cel_interpreter:: to cel:: and use IntoFunction trait.
affects: 0.5.0
gotchaOptional values are surfaced as cel.OptionalValue objects (since v0.5.5) instead of debug strings. Code relying on string output may break.
fix
Use .value property or isinstance() checks for OptionalValue.
affects: >=0.5.5
gotchaThe cel CLI command may conflict with other packages. On some systems, it might be shadowed by another executable named 'cel'.
fix
Call via python -m cel or check with `which cel`.
affects: all
Upgrade
Version history
0.6.0latest on PyPI · released May 12, 2026
Audit
Dependencies
cel-rust (cel crate)requiredRust core library for CEL evaluation
Agent activity
18 hits · last 30 days
node
14
OpenAI (training)
1
Resources
common-expression-language — pip install common-expression-language · libregistry