Skip to content

Installation

Getting Python CEL up and running is quick and easy.

Requirements

  • Python 3.11+ (required for compiled wheels)
  • pip or uv package manager

Install from PyPI

uv add common-expression-language

Install the CLI tool globally:

uv tool install common-expression-language
pip install common-expression-language

Verify Installation

After installation, you should have both the Python library and CLI tool available:

Python Library

import cel
result = cel.evaluate("1 + 2")
# → 3
assert result == 3
print("✓ Basic evaluation working correctly")
# → ✓ Basic evaluation working correctly

CLI Tool

cel --version
cel '1 + 2'
# → 3

Development Installation

If you want to contribute or build from source:

Prerequisites

  • Rust (latest stable)
  • Python 3.11+
  • maturin (for building)

From Source

# Clone the repository
git clone https://github.com/hardbyte/python-common-expression-language.git
cd python-common-expression-language

# Install in development mode
pip install maturin
maturin develop

# Or with uv
uv run maturin develop

Troubleshooting

Platform Issues

Pre-built wheels are available for:

  • Linux: x86_64, aarch64
  • macOS: x86_64, ARM64 (Apple Silicon)
  • Windows: x86_64

If your platform isn't supported, the package will try to build from source, which requires Rust to be installed.

What's Installed

After installation, you get:

  • cel module: Python library for embedding in your applications
  • cel command: CLI tool for interactive use and scripting
  • All dependencies: Rich, Typer, Pygments for CLI functionality

Next Steps