{"id":23447,"library":"common-expression-language","title":"Common Expression Language","description":"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.","status":"active","version":"0.5.6","language":"python","source_language":"en","source_url":"https://github.com/hardbyte/python-common-expression-language","tags":["cel","expression-language","evaluation","bindings"],"install":[{"cmd":"pip install common-expression-language","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Rust core library for CEL evaluation","package":"cel-rust (cel crate)","optional":false}],"imports":[{"wrong":"from cel import evaluate","symbol":"evaluate","correct":"from cel import evaluate"}],"quickstart":{"code":"from cel import evaluate\n\n# Evaluate a simple expression\nresult = evaluate(\"1 + 2\")\nprint(result)  # 3\n\n# With a context\ncontext = {\"age\": 18}\nresult = evaluate(\"age > 21\", context)\nprint(result)  # False\n\n# Use custom Python functions\ndef is_adult(age):\n    return age > 21\n\ncontext = {\"is_adult\": is_adult, \"age\": 18}\nresult = evaluate(\"is_adult(age)\", context)\nprint(result)  # False","lang":"python","description":"Basic usage: evaluate CEL expressions with optional context and custom functions."},"warnings":[{"fix":"Upgrade to >=0.5.6 for dict subclass support.","message":"Python 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.","severity":"gotcha","affected_versions":"<0.5.6"},{"fix":"No action needed for Python users; Rust bindings must update imports from cel_interpreter:: to cel:: and use IntoFunction trait.","message":"Rust API breaking change in v0.5.0: cel-interpreter crate renamed to cel, function registration changed. Python API unaffected.","severity":"breaking","affected_versions":"0.5.0"},{"fix":"Use .value property or isinstance() checks for OptionalValue.","message":"Optional values are surfaced as cel.OptionalValue objects (since v0.5.5) instead of debug strings. Code relying on string output may break.","severity":"gotcha","affected_versions":">=0.5.5"},{"fix":"Call via python -m cel or check with `which cel`.","message":"The cel CLI command may conflict with other packages. On some systems, it might be shadowed by another executable named 'cel'.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.5.6':20 '3.11':23 'activ':26 'bind':5,35 'cel':11,30 'cli':16 'common':1,8 'compil':14 'current':18 'develop':24 'evalu':13,34 'express':2,9,32 'expression-languag':31 'languag':3,10,33 'provid':12 'python':4,22 'regular':28 'releas':29 'requir':21 'tool':17 'version':19","created_at":"2026-05-01T08:07:49.700526+00:00","updated_at":"2026-05-01T08:07:49.700526+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmpl9_y47t6/venv/lib/python3.12/site-packages/cel/__init__.py\", line 3, in <module>\n    from . import cli, stdlib\n  File \"/tmp/tmpl9_y47t6/venv/lib/python3.12/site-packages/cel/cli.py\", line 38, in <module>\n    fr"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.6.0","cli_name":"cel","cli_version":"Traceback (most recent call last):","type":"library","homepage":null,"github":"https://github.com/hardbyte/python-common-expression-language","docs":null,"changelog":null,"pypi":"https://pypi.org/project/common-expression-language/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}