Skip to main content

CLIPS Python bindings

Project description

Python CFFI bindings for the ‘C’ Language Integrated Production System CLIPS 6.40.




Build Status Documentation Status

Initially 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. CLIPS is designed to facilitate the development of software to model human knowledge or expertise.

CLIPSPy brings CLIPS capabilities within the Python ecosystem.



On Linux, CLIPSPy is packaged for x86_64 architectures as a wheel according to PEP-513 guidelines. Most of the distributions should be supported.

$ [sudo] pip install clipspy


CLIPSPy comes as a wheel for most of the Python versions and architectures.

> pip install clipspy

Building from sources

The provided Makefile takes care of retrieving the CLIPS source code and compiling the Python bindings together with it.

$ make
$ sudo make install

Please check the documentation for more information regarding building CLIPSPy from sources.


import clips

(deftemplate person
  (slot name (type STRING))
  (slot surname (type STRING))
  (slot birthdate (type SYMBOL)))

environment = clips.Environment()

# load constructs into the environment from a file

# define a fact template

# retrieve the fact template
template = environment.find_template('person')

# assert a new fact through its template
fact = template.assert_fact(name='John',

# fact slots can be accessed as dictionary elements
assert fact['name'] == 'John'

# execute the activations in the agenda

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clipspy-1.0.0.tar.gz (27.2 kB view hashes)

Uploaded source

Built Distributions

clipspy-1.0.0-cp311-cp311-win_amd64.whl (567.9 kB view hashes)

Uploaded cp311

clipspy-1.0.0-cp310-cp310-win_amd64.whl (567.9 kB view hashes)

Uploaded cp310

clipspy-1.0.0-cp39-cp39-win_amd64.whl (570.5 kB view hashes)

Uploaded cp39

clipspy-1.0.0-cp38-cp38-win_amd64.whl (570.5 kB view hashes)

Uploaded cp38

clipspy-1.0.0-cp37-cp37m-win_amd64.whl (563.0 kB view hashes)

Uploaded cp37

clipspy-1.0.0-cp36-cp36m-win_amd64.whl (569.5 kB view hashes)

Uploaded cp36

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page