CLIPS Python bindings via CFFI
Project description
clipspyx
CLIPS Python bindings via CFFI. Fork of clipspy.
Building
clipspyx compiles CLIPS source directly into the CFFI extension. No separate libclips build step.
Prerequisites
- Python 3.10+
- C compiler (gcc/clang on Linux/macOS, MSVC on Windows)
- CLIPS source (auto-checked out from orphan branch, or provide your own)
Install for development
# Install with 64x backend (CLIPS 6.4x)
uv sync --extra 64x
# Install with 70x backend (CLIPS 7.0x)
uv sync --extra 70x
Switching backends
The 64x and 70x backends conflict with each other. Always use uv sync to switch:
# Switch to 64x
uv sync --extra 64x
# Switch to 70x
uv sync --extra 70x
Important: uv run --extra 64x does not remove a previously installed 70x backend
(and vice versa). Only uv sync --extra <variant> correctly installs the requested
backend and removes the conflicting one.
CLIPS source override
# Use an arbitrary CLIPS source directory
CLIPS_SOURCE_DIR=/path/to/clips/core uv sync --extra 64x
Build distributable wheels
uv run scripts/build-backend.py 64x # builds clipspyx-ffi + clipspyx-ffi-64x wheels
uv run scripts/build-backend.py 70x # builds clipspyx-ffi + clipspyx-ffi-70x wheels
CLIPS Source Management
CLIPS source is stored in git orphan branches (clips-64x, clips-70x).
Sync from SVN:
uv run scripts/sync-svn.py 64x # syncs core/ -> orphan branch clips-64x
uv run scripts/sync-svn.py 70x # syncs core/ -> orphan branch clips-70x
Usage
import clipspyx
env = clipspyx.Environment()
env.build('(defrule hello (initial-fact) => (println "Hello CLIPS!"))')
env.reset()
env.run()
Testing
uv run pytest tests/ -v
License
BSD-3-Clause. See LICENSE.txt.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clipspyx-0.4.0.tar.gz.
File metadata
- Download URL: clipspyx-0.4.0.tar.gz
- Upload date:
- Size: 84.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aca960ff272d7321f017f53defc52dffc16b788ffb5bd579a82b1d988645f275
|
|
| MD5 |
6e763d64336fdc3d44250928cbec87b4
|
|
| BLAKE2b-256 |
2033df5b35e52fe12c6194d3dfde141ef5885bb55e0af7c57b32bd568c255b76
|
Provenance
The following attestation bundles were made for clipspyx-0.4.0.tar.gz:
Publisher:
wheels.yml on inferal-oss/clipspyx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clipspyx-0.4.0.tar.gz -
Subject digest:
aca960ff272d7321f017f53defc52dffc16b788ffb5bd579a82b1d988645f275 - Sigstore transparency entry: 1155132519
- Sigstore integration time:
-
Permalink:
inferal-oss/clipspyx@c5911189caa82411f56345a7756f7648d974e354 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/inferal-oss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@c5911189caa82411f56345a7756f7648d974e354 -
Trigger Event:
push
-
Statement type:
File details
Details for the file clipspyx-0.4.0-py3-none-any.whl.
File metadata
- Download URL: clipspyx-0.4.0-py3-none-any.whl
- Upload date:
- Size: 67.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fec83d5c8fb94fd13b151e4335cb5343a327590f3b18e89af569de59d00153b
|
|
| MD5 |
5d8728e2b2af25fb6eaee2e3184ccde0
|
|
| BLAKE2b-256 |
b18547a87ed2f13b7d4849964cd1a69dc04f1338ad9172b37ce8ba521a60f9a2
|
Provenance
The following attestation bundles were made for clipspyx-0.4.0-py3-none-any.whl:
Publisher:
wheels.yml on inferal-oss/clipspyx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clipspyx-0.4.0-py3-none-any.whl -
Subject digest:
7fec83d5c8fb94fd13b151e4335cb5343a327590f3b18e89af569de59d00153b - Sigstore transparency entry: 1155132559
- Sigstore integration time:
-
Permalink:
inferal-oss/clipspyx@c5911189caa82411f56345a7756f7648d974e354 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/inferal-oss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@c5911189caa82411f56345a7756f7648d974e354 -
Trigger Event:
push
-
Statement type: