CLIPS Python bindings
Project description
Python CFFI bindings for CLIPS 6.30
- Source:
- Documentation:
- Download:
Installation
The CLIPS shared library and headers must be installed within the system.
If library and headers are not in the system default locations, they can be specified to the installer via the CFLAGS and LDFLAGS environment variables.
# CFLAGS="-I<headers path>" LDFLAGS="-L<library path>" pip install clipspy
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clipspy-0.2.4.tar.gz
(19.7 kB
view hashes)
Built Distributions
clipspy-0.2.4-cp37-cp37m-win32.whl
(414.4 kB
view hashes)
clipspy-0.2.4-cp36-cp36m-win32.whl
(416.1 kB
view hashes)
clipspy-0.2.4-cp35-cp35m-win32.whl
(416.2 kB
view hashes)
Close
Hashes for clipspy-0.2.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96caf6d0843ba35aaaaee4eb7714241ba4249ad45201ae7469a015de8612e1e5 |
|
MD5 | 44b6f501f1130acb9da14af56afeb81d |
|
BLAKE2b-256 | e266f31407774ee4dc486de406cdc84dbaf32af1a41037ebfb3c5c22d950d6e2 |
Close
Hashes for clipspy-0.2.4-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2243e3ddc9bcf8f198ef94f941bbfe8265812f59acd07fda5000008378527480 |
|
MD5 | fd6f1e5a84c87e87e8429c8d51c3a4c5 |
|
BLAKE2b-256 | 8fa192cc82047b7c2b646015b11d91862ae7274eda9fccd1723e04495cf3cd7d |
Close
Hashes for clipspy-0.2.4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f649c69b4ed5b012b12a48ba95c72cc61878aaafa0925ac1d53df54754cccf1 |
|
MD5 | 7bf7bd3b56b1c6da4776c249fa200060 |
|
BLAKE2b-256 | 4bf9d8e66953ecc18c323aae5340e5f3ac636a1f6b267890f9ac08c0f68a018b |
Close
Hashes for clipspy-0.2.4-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5c2ea115fd4184ddf3e24b78a91fd979d8917f09c5c594d91cfdc874ec5afb9 |
|
MD5 | 13372de6781ab44213103e6c00039b07 |
|
BLAKE2b-256 | dae54097a748bcfa48d890a10fadb3e96983ffd20bb9908a29c5e09d37949692 |
Close
Hashes for clipspy-0.2.4-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff265a63e6fe92629196cc9f81808e1fc08c03a35cdcb7d2ed480ae97fce267a |
|
MD5 | ad9bb3220015cc84b7dcd2f065aece1d |
|
BLAKE2b-256 | 4675d962b8d6ca7ecfdebe6b8db58a3dda12e39f79722ba3dd73d6783c96de71 |
Close
Hashes for clipspy-0.2.4-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cca503dd8967fd28489b692c6904da671e1340e1e1a33dd091319c249720e07 |
|
MD5 | 7288bff9f070faa19041602bfffa31aa |
|
BLAKE2b-256 | feeba56f741019756d27666cb4730be5078500c53531ef5c6b9e7da02f14a7d8 |