cel-python
Pure Python implementation of Google Common Expression Language
Decision gist · record as of 2026-08-14
Yes, if you need to evaluate untrusted or policy-defined expressions safely without exposing Python's full execution model. The low install friction and lack of known vulnerabilities are positives. However, the aging maintenance status (195 days since last release) and unclear license require verification before production use. Suitable for embedded policy evaluation; less suitable if you need active upstream support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with six runtime dependencies bundled as a wheel.
- Maintenance status is aging—last release was 195 days ago—but the package remains in Beta and supports current Python versions (requires Python 3.10+).
License · maintenance · safety
(unclear) — License treatment is unclear; no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before use in proprietary or copyleft-sensitive projects.
last release 2026-01-31 (195 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,706,378 downloads/mo, #1,867 on PyPI
Alternatives
Verify before relying
import cel-python
env = Environment()
ast = env.compile('account.balance >= 500')
prgm = env.program(ast)
result = prgm.evaluate({'account': json_to_cel({'balance': 600})})- Whether the package is actively maintained or in maintenance-only mode given the 195-day gap since last release.
- The actual license under which cel-python is distributed, since metadata shows no SPDX or raw license text.
- Performance characteristics and scalability limits for large or complex CEL expressions in production use.
- How type coercion and division semantics (truncating toward zero) affect real-world policy evaluation workflows.
What it is and what it does
cel-python is a pure Python runtime for Google's Common Expression Language, a domain-specific language designed for secure, portable expression evaluation across systems without exposing the full power of Python. It compiles CEL source code into an abstract syntax tree, then into an executable program that can be evaluated against provided context data. The package is intended for use cases where you need to safely evaluate user-supplied or policy-defined expressions—such as security filters, access control rules, or data validation—without the risks of arbitrary code execution.
The implementation follows the Go CEL reference closely, with six core dependencies (google-re2, jmespath, lark, pendulum, pyyaml, tomli) that handle regex matching, JSON path queries, parsing, date/time operations, and configuration. It can be used as a library within Python applications or invoked from the command line as a calculator-like tool or JSON filter. Type semantics differ from Python's native types; division truncates toward zero rather than toward negative infinity, and type coercion is minimal.
Use it for
- Embed security policy filters in infrastructure-as-code systems to evaluate compliance rules without executing arbitrary Python code.
- Evaluate access control expressions in API gateways or authorization systems where policies must be portable across languages.
- Validate or transform JSON data from stdin using CEL expressions, similar to jq but with CEL's type system and semantics.
- Define and check complex business rules (e.g., account overdraft protection logic) in a sandboxed, language-neutral format.
- Build policy-as-code systems where non-developers can write safe, auditable expressions for infrastructure or application decisions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to evaluate untrusted or policy-defined expressions safely without exposing Python's full execution model.
The low install friction and lack of known vulnerabilities are positives. However, the aging maintenance status (195 days since last release) and unclear license require verification before production use. Suitable for embedded policy evaluation; less suitable if you need active upstream support.
Install
cel-python on PyPI
Before you install
Low install friction with six runtime dependencies bundled as a wheel. Maintenance status is aging—last release was 195 days ago—but the package remains in Beta and supports current Python versions (requires Python 3.10+).
Requires Python 3.10 or later.
License in practice
License treatment is unclear; no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before use in proprietary or copyleft-sensitive projects.
Quickstart
import cel-python
env = Environment()
ast = env.compile('account.balance >= 500')
prgm = env.program(ast)
result = prgm.evaluate({'account': json_to_cel({'balance': 600})})
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode given the 195-day gap since last release.
- The actual license under which cel-python is distributed, since metadata shows no SPDX or raw license text.
- Performance characteristics and scalability limits for large or complex CEL expressions in production use.
- How type coercion and division semantics (truncating toward zero) affect real-world policy evaluation workflows.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesgoogle-re2jmespathlarkpendulumpyyamltomli |
| Maintenance | Aging 195 days since the last release |
| First released | |
| Downloads | 6,706,378 / month, #1,867 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaProgramming Language :: Python |
Evidence: cel_python-0.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “CEL expression evaluator”
- cel-pythonParses and evaluates Google Common Expression Language (CEL)…
- cel-expr-pythonA Python wrapper for the CEL C++ implementation that compiles and…
- common-expression-languageEvaluates Google's Common Expression Language (CEL) expressions in…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also cel-expr-python · common-expression-language · leval · asteval · simpleeval · jsonata-python · pure-eval · promql-parser · protovalidate · google-re2