ruledsl 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ruledsl-1.0.2/LICENSE +64 -0
- ruledsl-1.0.2/PKG-INFO +144 -0
- ruledsl-1.0.2/README-pypi.md +57 -0
- ruledsl-1.0.2/build_src/ruledsl/__init__.py +697 -0
- ruledsl-1.0.2/build_src/ruledsl/workbench.py +540 -0
- ruledsl-1.0.2/build_src/ruledsl.egg-info/PKG-INFO +144 -0
- ruledsl-1.0.2/build_src/ruledsl.egg-info/SOURCES.txt +10 -0
- ruledsl-1.0.2/build_src/ruledsl.egg-info/dependency_links.txt +1 -0
- ruledsl-1.0.2/build_src/ruledsl.egg-info/entry_points.txt +2 -0
- ruledsl-1.0.2/build_src/ruledsl.egg-info/top_level.txt +1 -0
- ruledsl-1.0.2/pyproject.toml +42 -0
- ruledsl-1.0.2/setup.cfg +4 -0
ruledsl-1.0.2/LICENSE
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
Copyright (c) 2025 Tanzer Cakir
|
|
2
|
+
Licensor: Tanzer Cakir
|
|
3
|
+
|
|
4
|
+
The RuleDSL SDK is provided under the PolyForm Free Trial License 1.0.0.
|
|
5
|
+
The complete, unmodified license text follows. Commercial production use
|
|
6
|
+
requires a separate commercial license agreement with the Licensor.
|
|
7
|
+
|
|
8
|
+
----------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
# PolyForm Free Trial License 1.0.0
|
|
11
|
+
|
|
12
|
+
<https://polyformproject.org/licenses/free-trial/1.0.0>
|
|
13
|
+
|
|
14
|
+
## Acceptance
|
|
15
|
+
|
|
16
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
17
|
+
|
|
18
|
+
## Copyright License
|
|
19
|
+
|
|
20
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license), and you may not distribute copies of the software.
|
|
21
|
+
|
|
22
|
+
## Changes and New Works License
|
|
23
|
+
|
|
24
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
25
|
+
|
|
26
|
+
## Patent License
|
|
27
|
+
|
|
28
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
29
|
+
|
|
30
|
+
## Fair Use
|
|
31
|
+
|
|
32
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
33
|
+
|
|
34
|
+
## Free Trial
|
|
35
|
+
|
|
36
|
+
Use to evaluate whether the software suits a particular application for less than 32 consecutive calendar days, on behalf of you or your company, is use for a permitted purpose.
|
|
37
|
+
|
|
38
|
+
## No Other Rights
|
|
39
|
+
|
|
40
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
41
|
+
|
|
42
|
+
## Patent Defense
|
|
43
|
+
|
|
44
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
45
|
+
|
|
46
|
+
## Violations
|
|
47
|
+
|
|
48
|
+
If you violate any of these terms, or do anything with the software not covered by your licenses, all your licenses end immediately.
|
|
49
|
+
|
|
50
|
+
## No Liability
|
|
51
|
+
|
|
52
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
53
|
+
|
|
54
|
+
## Definitions
|
|
55
|
+
|
|
56
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
57
|
+
|
|
58
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
59
|
+
|
|
60
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
61
|
+
|
|
62
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
63
|
+
|
|
64
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
ruledsl-1.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ruledsl
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: Python binding and desktop workbench (authoring & replay companion) for the RuleDSL deterministic rule engine. The engine library ships separately via GitHub Releases.
|
|
5
|
+
Author: Tanzer Cakir
|
|
6
|
+
License: Copyright (c) 2025 Tanzer Cakir
|
|
7
|
+
Licensor: Tanzer Cakir
|
|
8
|
+
|
|
9
|
+
The RuleDSL SDK is provided under the PolyForm Free Trial License 1.0.0.
|
|
10
|
+
The complete, unmodified license text follows. Commercial production use
|
|
11
|
+
requires a separate commercial license agreement with the Licensor.
|
|
12
|
+
|
|
13
|
+
----------------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
# PolyForm Free Trial License 1.0.0
|
|
16
|
+
|
|
17
|
+
<https://polyformproject.org/licenses/free-trial/1.0.0>
|
|
18
|
+
|
|
19
|
+
## Acceptance
|
|
20
|
+
|
|
21
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
22
|
+
|
|
23
|
+
## Copyright License
|
|
24
|
+
|
|
25
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license), and you may not distribute copies of the software.
|
|
26
|
+
|
|
27
|
+
## Changes and New Works License
|
|
28
|
+
|
|
29
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
30
|
+
|
|
31
|
+
## Patent License
|
|
32
|
+
|
|
33
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
34
|
+
|
|
35
|
+
## Fair Use
|
|
36
|
+
|
|
37
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
38
|
+
|
|
39
|
+
## Free Trial
|
|
40
|
+
|
|
41
|
+
Use to evaluate whether the software suits a particular application for less than 32 consecutive calendar days, on behalf of you or your company, is use for a permitted purpose.
|
|
42
|
+
|
|
43
|
+
## No Other Rights
|
|
44
|
+
|
|
45
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
46
|
+
|
|
47
|
+
## Patent Defense
|
|
48
|
+
|
|
49
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
50
|
+
|
|
51
|
+
## Violations
|
|
52
|
+
|
|
53
|
+
If you violate any of these terms, or do anything with the software not covered by your licenses, all your licenses end immediately.
|
|
54
|
+
|
|
55
|
+
## No Liability
|
|
56
|
+
|
|
57
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
58
|
+
|
|
59
|
+
## Definitions
|
|
60
|
+
|
|
61
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
62
|
+
|
|
63
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
64
|
+
|
|
65
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
66
|
+
|
|
67
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
68
|
+
|
|
69
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
|
70
|
+
|
|
71
|
+
Project-URL: Homepage, https://axiom-foundry.github.io/RuleDSL-SDK/
|
|
72
|
+
Project-URL: Repository, https://github.com/axiom-foundry/RuleDSL-SDK
|
|
73
|
+
Project-URL: Demos, https://axiom-foundry.github.io/RuleDSL-SDK/demos/
|
|
74
|
+
Project-URL: Releases, https://github.com/axiom-foundry/RuleDSL-SDK/releases
|
|
75
|
+
Keywords: rules,rule-engine,deterministic,bytecode,decisioning,compliance
|
|
76
|
+
Classifier: Development Status :: 4 - Beta
|
|
77
|
+
Classifier: Intended Audience :: Developers
|
|
78
|
+
Classifier: License :: Other/Proprietary License
|
|
79
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
80
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
81
|
+
Classifier: Programming Language :: Python :: 3
|
|
82
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
83
|
+
Requires-Python: >=3.7
|
|
84
|
+
Description-Content-Type: text/markdown
|
|
85
|
+
License-File: LICENSE
|
|
86
|
+
Dynamic: license-file
|
|
87
|
+
|
|
88
|
+
# ruledsl
|
|
89
|
+
|
|
90
|
+
Python binding and desktop **workbench** for [RuleDSL](https://axiom-foundry.github.io/RuleDSL-SDK/) —
|
|
91
|
+
a deterministic, embedded business-rule engine with a stable C ABI.
|
|
92
|
+
*Same input, same bytecode, same decision — on every run and every platform.*
|
|
93
|
+
|
|
94
|
+
This package is **pure Python** (ctypes, zero dependencies). The engine library
|
|
95
|
+
itself (`ruledsl_capi.dll` / `libruledsl_capi.so`) is **not** inside — download an
|
|
96
|
+
SDK bundle from [GitHub Releases](https://github.com/axiom-foundry/RuleDSL-SDK/releases)
|
|
97
|
+
and point the binding at it.
|
|
98
|
+
|
|
99
|
+
## The workbench — authoring & replay companion
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
pip install ruledsl
|
|
103
|
+
ruledsl-workbench --dll path/to/ruledsl_capi.dll
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
A zero-dependency Tkinter desktop tool for the two human ends of the rule
|
|
107
|
+
pipeline (it is not a server component — servers embed the C ABI directly):
|
|
108
|
+
|
|
109
|
+
- **Authoring:** edit a ruleset (or `File > Open Rules…`), run it against sample
|
|
110
|
+
inputs, read the decision, its output fields, the engine's own evaluation
|
|
111
|
+
trace (*why* this decision), and a canonical decision hash. **Run 100×**
|
|
112
|
+
asserts every run produced the identical hash — the determinism contract, live.
|
|
113
|
+
- **Replay:** `File > Open Bytecode (Replay)…` loads a compiled `.axbc` exactly
|
|
114
|
+
as your server ran it (no recompilation; the editor is disabled), and
|
|
115
|
+
`File > Load Inputs from JSON…` restores an incident's inputs. Same bytecode,
|
|
116
|
+
same input → the same decision and trace, on your desk.
|
|
117
|
+
- Deliberately **no** `.axbc` export: production artifacts come from `ruledslc`,
|
|
118
|
+
which stamps the authenticity manifest.
|
|
119
|
+
|
|
120
|
+
## The binding
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
from ruledsl import RuleDSL
|
|
124
|
+
|
|
125
|
+
with RuleDSL("path/to/ruledsl_capi.dll") as engine: # .so on Linux
|
|
126
|
+
bytecode = engine.compile('rule r1 { when amount > 100; then decline; }')
|
|
127
|
+
decision = engine.evaluate(bytecode, {"amount": 250.0})
|
|
128
|
+
print(decision.action, decision.rule_name) # DECLINE r1
|
|
129
|
+
|
|
130
|
+
trace = []
|
|
131
|
+
engine.evaluate(bytecode, {"amount": 250.0}, on_trace=trace.append)
|
|
132
|
+
print("\n".join(trace)) # why this decision
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Deterministic by contract: the engine never reads the system clock (time-based
|
|
136
|
+
rules require an explicit `now_utc_ms`), never touches the network, and returns
|
|
137
|
+
stable, append-only error codes.
|
|
138
|
+
|
|
139
|
+
## Version & license
|
|
140
|
+
|
|
141
|
+
Package versions track the SDK line (`1.0.x` works with engine `1.0.x`, ABI 1).
|
|
142
|
+
Licensed under the **PolyForm Free Trial License 1.0.0** — evaluation use;
|
|
143
|
+
commercial production use requires a separate agreement (see the
|
|
144
|
+
[repository](https://github.com/axiom-foundry/RuleDSL-SDK)).
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# ruledsl
|
|
2
|
+
|
|
3
|
+
Python binding and desktop **workbench** for [RuleDSL](https://axiom-foundry.github.io/RuleDSL-SDK/) —
|
|
4
|
+
a deterministic, embedded business-rule engine with a stable C ABI.
|
|
5
|
+
*Same input, same bytecode, same decision — on every run and every platform.*
|
|
6
|
+
|
|
7
|
+
This package is **pure Python** (ctypes, zero dependencies). The engine library
|
|
8
|
+
itself (`ruledsl_capi.dll` / `libruledsl_capi.so`) is **not** inside — download an
|
|
9
|
+
SDK bundle from [GitHub Releases](https://github.com/axiom-foundry/RuleDSL-SDK/releases)
|
|
10
|
+
and point the binding at it.
|
|
11
|
+
|
|
12
|
+
## The workbench — authoring & replay companion
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
pip install ruledsl
|
|
16
|
+
ruledsl-workbench --dll path/to/ruledsl_capi.dll
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
A zero-dependency Tkinter desktop tool for the two human ends of the rule
|
|
20
|
+
pipeline (it is not a server component — servers embed the C ABI directly):
|
|
21
|
+
|
|
22
|
+
- **Authoring:** edit a ruleset (or `File > Open Rules…`), run it against sample
|
|
23
|
+
inputs, read the decision, its output fields, the engine's own evaluation
|
|
24
|
+
trace (*why* this decision), and a canonical decision hash. **Run 100×**
|
|
25
|
+
asserts every run produced the identical hash — the determinism contract, live.
|
|
26
|
+
- **Replay:** `File > Open Bytecode (Replay)…` loads a compiled `.axbc` exactly
|
|
27
|
+
as your server ran it (no recompilation; the editor is disabled), and
|
|
28
|
+
`File > Load Inputs from JSON…` restores an incident's inputs. Same bytecode,
|
|
29
|
+
same input → the same decision and trace, on your desk.
|
|
30
|
+
- Deliberately **no** `.axbc` export: production artifacts come from `ruledslc`,
|
|
31
|
+
which stamps the authenticity manifest.
|
|
32
|
+
|
|
33
|
+
## The binding
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from ruledsl import RuleDSL
|
|
37
|
+
|
|
38
|
+
with RuleDSL("path/to/ruledsl_capi.dll") as engine: # .so on Linux
|
|
39
|
+
bytecode = engine.compile('rule r1 { when amount > 100; then decline; }')
|
|
40
|
+
decision = engine.evaluate(bytecode, {"amount": 250.0})
|
|
41
|
+
print(decision.action, decision.rule_name) # DECLINE r1
|
|
42
|
+
|
|
43
|
+
trace = []
|
|
44
|
+
engine.evaluate(bytecode, {"amount": 250.0}, on_trace=trace.append)
|
|
45
|
+
print("\n".join(trace)) # why this decision
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Deterministic by contract: the engine never reads the system clock (time-based
|
|
49
|
+
rules require an explicit `now_utc_ms`), never touches the network, and returns
|
|
50
|
+
stable, append-only error codes.
|
|
51
|
+
|
|
52
|
+
## Version & license
|
|
53
|
+
|
|
54
|
+
Package versions track the SDK line (`1.0.x` works with engine `1.0.x`, ABI 1).
|
|
55
|
+
Licensed under the **PolyForm Free Trial License 1.0.0** — evaluation use;
|
|
56
|
+
commercial production use requires a separate agreement (see the
|
|
57
|
+
[repository](https://github.com/axiom-foundry/RuleDSL-SDK)).
|