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.3.tar.gz (20.9 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.3-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ruledsl-1.0.3.tar.gz
  • Upload date:
  • Size: 20.9 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.3.tar.gz
Algorithm Hash digest
SHA256 93696fb376aecc0c96fd0cd6e738e771ad16bd31be9eeedb3f64466a45af2371
MD5 4b7c0a3b77023a4978e7109a0d4230ff
BLAKE2b-256 490a6c9e5bdeda79620a7192820c4938282a4c34878992a8299dc9ac3111d3c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruledsl-1.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: ruledsl-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 20.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d786f8d5bfbbf2eb56856846e9826150f765c7508d09f1ac8e74108811d7ca6f
MD5 320a0cc87d0757b23ea16ca523756cd6
BLAKE2b-256 89605daad55c6a21cb400dd02b9b880c17c7d6ae11f58c3f03f08dc60428140a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruledsl-1.0.3-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