Skip to main content

CLIPS Python bindings

Project description

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

Source:https://github.com/noxdafox/clipspy
Documentation:https://clipspy.readthedocs.io
Download:https://pypi.python.org/pypi/clipspy

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.

Installation

Linux

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

Windows

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.

Example

from clips import Environment, Symbol

environment = Environment()

# load constructs into the environment
environment.load('constructs.clp')

# assert a fact as string
environment.assert_string('(a-fact)')

# retrieve a fact template
template = environment.find_template('a-fact')

# create a new fact from the template
fact = template.new_fact()

# implied (ordered) facts are accessed as lists
fact.append(42)
fact.extend(("foo", "bar"))

# assert the fact within the environment
fact.assertit()

# retrieve another fact template
template = environment.find_template('another-fact')
fact = template.new_fact()

# template (unordered) facts are accessed as dictionaries
fact["slot-name"] = Symbol("foo")

fact.assertit()

# execute the activations in the agenda
environment.run()

Project details


Download files

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

Files for clipspy, version 0.3.3
Filename, size File type Python version Upload date Hashes
Filename, size clipspy-0.3.3-cp27-cp27m-manylinux1_x86_64.whl (688.0 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size clipspy-0.3.3-cp27-cp27m-manylinux2010_x86_64.whl (688.0 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size clipspy-0.3.3-cp27-cp27mu-manylinux1_x86_64.whl (688.0 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size clipspy-0.3.3-cp27-cp27mu-manylinux2010_x86_64.whl (688.0 kB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size clipspy-0.3.3-cp34-cp34m-manylinux1_x86_64.whl (684.1 kB) File type Wheel Python version cp34 Upload date Hashes View
Filename, size clipspy-0.3.3-cp34-cp34m-manylinux2010_x86_64.whl (684.1 kB) File type Wheel Python version cp34 Upload date Hashes View
Filename, size clipspy-0.3.3-cp35-cp35m-manylinux1_x86_64.whl (684.2 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size clipspy-0.3.3-cp35-cp35m-manylinux2010_x86_64.whl (684.2 kB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size clipspy-0.3.3-cp36-cp36m-manylinux1_x86_64.whl (683.7 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size clipspy-0.3.3-cp36-cp36m-manylinux2010_x86_64.whl (683.8 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size clipspy-0.3.3-cp37-cp37m-manylinux1_x86_64.whl (683.8 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size clipspy-0.3.3-cp37-cp37m-manylinux2010_x86_64.whl (683.8 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size clipspy-0.3.3-cp38-cp38-manylinux1_x86_64.whl (686.3 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size clipspy-0.3.3-cp38-cp38-manylinux2010_x86_64.whl (686.3 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size clipspy-0.3.3.tar.gz (22.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page