Skip to main content

Python binding and desktop workbench (authoring & replay companion) for the RuleDSL deterministic rule engine. The engine library ships separately via GitHub Releases.

Project description

ruledsl

Python binding and desktop workbench for RuleDSL — a deterministic, embedded business-rule engine with a stable C ABI. Same input, same bytecode, same decision — on every run and every platform.

This package is pure Python (ctypes, zero dependencies). The engine library itself (ruledsl_capi.dll / libruledsl_capi.so) is not inside — download an SDK bundle from GitHub Releases and point the binding at it.

The workbench — authoring & replay companion

pip install ruledsl
ruledsl-workbench --dll path/to/ruledsl_capi.dll

A zero-dependency Tkinter desktop tool for the two human ends of the rule pipeline (it is not a server component — servers embed the C ABI directly):

  • Authoring: edit a ruleset (or File > Open Rules…), run it against sample inputs, read the decision, its output fields, the engine's own evaluation trace (why this decision), and a canonical decision hash. Run 100× asserts every run produced the identical hash — the determinism contract, live.
  • Replay: File > Open Bytecode (Replay)… loads a compiled .axbc exactly as your server ran it (no recompilation; the editor is disabled), and File > Load Inputs from JSON… restores an incident's inputs. Same bytecode, same input → the same decision and trace, on your desk.
  • Deliberately no .axbc export: production artifacts come from ruledslc, which stamps the authenticity manifest.

The binding

from ruledsl import RuleDSL

with RuleDSL("path/to/ruledsl_capi.dll") as engine:   # .so on Linux
    bytecode = engine.compile('rule r1 { when amount > 100; then decline; }')
    decision = engine.evaluate(bytecode, {"amount": 250.0})
    print(decision.action, decision.rule_name)         # DECLINE r1

    trace = []
    engine.evaluate(bytecode, {"amount": 250.0}, on_trace=trace.append)
    print("\n".join(trace))                            # why this decision

Deterministic by contract: the engine never reads the system clock (time-based rules require an explicit now_utc_ms), never touches the network, and returns stable, append-only error codes.

Version & license

Package versions track the SDK line (1.0.x works with engine 1.0.x, ABI 1). Licensed under the PolyForm Free Trial License 1.0.0 — evaluation use; commercial production use requires a separate agreement (see the repository).

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

ruledsl-1.0.2.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ruledsl-1.0.2-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file ruledsl-1.0.2.tar.gz.

File metadata

  • Download URL: ruledsl-1.0.2.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ruledsl-1.0.2.tar.gz
Algorithm Hash digest
SHA256 419a003c46e2193da8ae7bce70a2d5be98b3debc0f85b647412fbdfd796c81e6
MD5 0cc3b2be2787400bc7555c3f1affd182
BLAKE2b-256 4a3e0910e3afaba9c9e24826753dfa70e26db80f7fdde524f96e5c66735a2dd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruledsl-1.0.2.tar.gz:

Publisher: pypi-publish.yml on axiom-foundry/RuleDSL-SDK

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ruledsl-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: ruledsl-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ruledsl-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 086e13af32700402966f7b61558bc672b073e44e3b5224be08dd24eb383ab2e6
MD5 71e3e972731d605d648daac7cadaa91f
BLAKE2b-256 4b54045dabab1ca942bf44a424b51cd95f5ffd0c1ab05a390902cce24bc1b037

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruledsl-1.0.2-py3-none-any.whl:

Publisher: pypi-publish.yml on axiom-foundry/RuleDSL-SDK

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page