Skip to content

Instantly share code, notes, and snippets.

@matburt
Created December 3, 2025 14:57
Show Gist options
  • Select an option

  • Save matburt/6a4f058df05150d5fc32d6f90624fa38 to your computer and use it in GitHub Desktop.

Select an option

Save matburt/6a4f058df05150d5fc32d6f90624fa38 to your computer and use it in GitHub Desktop.
Evaluating CLIPSPy relative to drools for ansible-rulebook

Overview clipspy provides Python CFFI bindings to CLIPS 6.42, the expert system shell originally developed at NASA's Johnson Space Center. CLIPS is a rule-based programming language useful for creating expert and production systems where a heuristic solution is easier to implement and maintain than an imperative one. PyPI Project Health

License: BSD 3-Clause Latest Release: 1.0.6 (October 2025) Python Support: 3.9 - 3.14 Platforms: Linux (x86_64, aarch64), macOS (Intel & Silicon), Windows Wheel availability: Pre-built wheels for most platforms via pip

Core Architecture The clipspy bindings aim to be a "pythonic" thin layer built on top of the CLIPS native C APIs. Most of the functions and methods directly resolve to the CLIPS functions documented in the Advanced Programming Guide. Readthedocs Key characteristics:

CLIPS uses forward chaining. Like other expert system languages, CLIPS deals with rules and facts. Various facts can make a rule applicable. An applicable rule is then fired. Wikipedia Rules are defined in CLIPS' Lisp-like syntax Python functions can be embedded into CLIPS and called from rules Full working memory management with facts, templates, and inference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment