rule-engine 4.5.3__tar.gz → 5.0.0__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.
- {rule_engine-4.5.3 → rule_engine-5.0.0}/PKG-INFO +10 -25
- {rule_engine-4.5.3 → rule_engine-5.0.0}/README.rst +2 -2
- {rule_engine-4.5.3 → rule_engine-5.0.0}/lib/rule_engine/__init__.py +19 -1
- rule_engine-5.0.0/lib/rule_engine/_vendor/__init__.py +4 -0
- rule_engine-5.0.0/lib/rule_engine/_vendor/ply/LICENSE +32 -0
- rule_engine-5.0.0/lib/rule_engine/_vendor/ply/__init__.py +5 -0
- rule_engine-5.0.0/lib/rule_engine/_vendor/ply/lex.py +1098 -0
- rule_engine-5.0.0/lib/rule_engine/_vendor/ply/yacc.py +3433 -0
- rule_engine-5.0.0/lib/rule_engine/ast/__init__.py +92 -0
- rule_engine-5.0.0/lib/rule_engine/ast/base.py +343 -0
- rule_engine-5.0.0/lib/rule_engine/ast/binary/__init__.py +103 -0
- rule_engine-5.0.0/lib/rule_engine/ast/binary/arithmetic.py +211 -0
- rule_engine-5.0.0/lib/rule_engine/ast/binary/base.py +112 -0
- rule_engine-5.0.0/lib/rule_engine/ast/binary/comparison.py +154 -0
- rule_engine-5.0.0/lib/rule_engine/ast/expression/__init__.py +35 -0
- rule_engine-5.0.0/lib/rule_engine/ast/expression/access.py +434 -0
- rule_engine-5.0.0/lib/rule_engine/ast/expression/control.py +256 -0
- rule_engine-5.0.0/lib/rule_engine/ast/expression/resolution.py +220 -0
- rule_engine-5.0.0/lib/rule_engine/ast/literal.py +183 -0
- rule_engine-5.0.0/lib/rule_engine/builtins.py +230 -0
- {rule_engine-4.5.3 → rule_engine-5.0.0}/lib/rule_engine/debug_ast.py +19 -19
- rule_engine-5.0.0/lib/rule_engine/debug_repl.py +159 -0
- rule_engine-5.0.0/lib/rule_engine/engine/__init__.py +34 -0
- rule_engine-5.0.0/lib/rule_engine/engine/_attribute_resolver.py +353 -0
- rule_engine-5.0.0/lib/rule_engine/engine/context.py +438 -0
- rule_engine-5.0.0/lib/rule_engine/engine/rule.py +148 -0
- rule_engine-5.0.0/lib/rule_engine/errors.py +359 -0
- rule_engine-5.0.0/lib/rule_engine/parser/__init__.py +614 -0
- rule_engine-5.0.0/lib/rule_engine/parser/base.py +86 -0
- rule_engine-5.0.0/lib/rule_engine/parser/utilities.py +114 -0
- rule_engine-5.0.0/lib/rule_engine/suggestions.py +105 -0
- rule_engine-5.0.0/lib/rule_engine/types/__init__.py +61 -0
- rule_engine-5.0.0/lib/rule_engine/types/_object.py +318 -0
- rule_engine-5.0.0/lib/rule_engine/types/coercion.py +141 -0
- rule_engine-5.0.0/lib/rule_engine/types/dataclass.py +149 -0
- rule_engine-5.0.0/lib/rule_engine/types/datatype.py +398 -0
- rule_engine-5.0.0/lib/rule_engine/types/definitions.py +454 -0
- rule_engine-5.0.0/lib/rule_engine/types/sqlalchemy.py +171 -0
- {rule_engine-4.5.3 → rule_engine-5.0.0}/lib/rule_engine.egg-info/PKG-INFO +10 -25
- rule_engine-5.0.0/lib/rule_engine.egg-info/SOURCES.txt +44 -0
- {rule_engine-4.5.3 → rule_engine-5.0.0}/lib/rule_engine.egg-info/requires.txt +0 -1
- rule_engine-5.0.0/pyproject.toml +90 -0
- rule_engine-4.5.3/lib/rule_engine/ast.py +0 -1280
- rule_engine-4.5.3/lib/rule_engine/builtins.py +0 -214
- rule_engine-4.5.3/lib/rule_engine/debug_repl.py +0 -144
- rule_engine-4.5.3/lib/rule_engine/engine.py +0 -675
- rule_engine-4.5.3/lib/rule_engine/errors.py +0 -311
- rule_engine-4.5.3/lib/rule_engine/parser/__init__.py +0 -564
- rule_engine-4.5.3/lib/rule_engine/parser/base.py +0 -82
- rule_engine-4.5.3/lib/rule_engine/parser/parsetab.py +0 -98
- rule_engine-4.5.3/lib/rule_engine/parser/utilities.py +0 -115
- rule_engine-4.5.3/lib/rule_engine/suggestions.py +0 -102
- rule_engine-4.5.3/lib/rule_engine/types.py +0 -618
- rule_engine-4.5.3/lib/rule_engine.egg-info/SOURCES.txt +0 -21
- rule_engine-4.5.3/setup.py +0 -99
- {rule_engine-4.5.3 → rule_engine-5.0.0}/LICENSE +0 -0
- {rule_engine-4.5.3 → rule_engine-5.0.0}/lib/rule_engine.egg-info/dependency_links.txt +0 -0
- {rule_engine-4.5.3 → rule_engine-5.0.0}/lib/rule_engine.egg-info/top_level.txt +0 -0
- {rule_engine-4.5.3 → rule_engine-5.0.0}/setup.cfg +0 -0
|
@@ -1,41 +1,26 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: rule-engine
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.0
|
|
4
4
|
Summary: A lightweight, optionally typed expression language with a custom grammar for matching arbitrary Python objects.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Author-email: zeroSteiner@gmail.com
|
|
8
|
-
Maintainer: Spencer McIntyre
|
|
9
|
-
Maintainer-email: zeroSteiner@gmail.com
|
|
5
|
+
Author-email: Spencer McIntyre <zeroSteiner@gmail.com>
|
|
6
|
+
Maintainer-email: Spencer McIntyre <zeroSteiner@gmail.com>
|
|
10
7
|
License: BSD
|
|
8
|
+
Project-URL: Homepage, https://github.com/zeroSteiner/rule-engine
|
|
11
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
10
|
Classifier: Environment :: Console
|
|
13
11
|
Classifier: Intended Audience :: Developers
|
|
14
12
|
Classifier: License :: OSI Approved :: BSD License
|
|
15
13
|
Classifier: Operating System :: OS Independent
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
20
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
18
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.10
|
|
24
20
|
Description-Content-Type: text/x-rst
|
|
25
21
|
License-File: LICENSE
|
|
26
|
-
Requires-Dist: ply>=3.9
|
|
27
22
|
Requires-Dist: python-dateutil~=2.7
|
|
28
|
-
Dynamic:
|
|
29
|
-
Dynamic: author-email
|
|
30
|
-
Dynamic: classifier
|
|
31
|
-
Dynamic: description
|
|
32
|
-
Dynamic: description-content-type
|
|
33
|
-
Dynamic: home-page
|
|
34
|
-
Dynamic: license
|
|
35
|
-
Dynamic: maintainer
|
|
36
|
-
Dynamic: maintainer-email
|
|
37
|
-
Dynamic: requires-dist
|
|
38
|
-
Dynamic: summary
|
|
23
|
+
Dynamic: license-file
|
|
39
24
|
|
|
40
25
|
Rule Engine
|
|
41
26
|
===========
|
|
@@ -46,8 +31,8 @@ A lightweight, optionally typed expression language with a custom grammar for ma
|
|
|
46
31
|
Documentation is available at https://zeroSteiner.github.io/rule-engine/.
|
|
47
32
|
|
|
48
33
|
:Warning:
|
|
49
|
-
|
|
50
|
-
|
|
34
|
+
Version 5.0 removes support for Python versions 3.6, 3.7, 3.8, and 3.9 and deprecates attribute-style access on
|
|
35
|
+
``MAPPING`` values (use bracket syntax ``mapping["key"]`` instead). See the `Change Log`_ for details.
|
|
51
36
|
|
|
52
37
|
Rule Engine expressions are written in their own language, defined as strings in Python. The syntax is most similar to
|
|
53
38
|
Python with some inspiration from Ruby. Some features of this language includes:
|
|
@@ -7,8 +7,8 @@ A lightweight, optionally typed expression language with a custom grammar for ma
|
|
|
7
7
|
Documentation is available at https://zeroSteiner.github.io/rule-engine/.
|
|
8
8
|
|
|
9
9
|
:Warning:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Version 5.0 removes support for Python versions 3.6, 3.7, 3.8, and 3.9 and deprecates attribute-style access on
|
|
11
|
+
``MAPPING`` values (use bracket syntax ``mapping["key"]`` instead). See the `Change Log`_ for details.
|
|
12
12
|
|
|
13
13
|
Rule Engine expressions are written in their own language, defined as strings in Python. The syntax is most similar to
|
|
14
14
|
Python with some inspiration from Ruby. Some features of this language includes:
|
|
@@ -30,11 +30,13 @@
|
|
|
30
30
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
31
|
#
|
|
32
32
|
|
|
33
|
-
__version__ = '
|
|
33
|
+
__version__ = '5.0.0'
|
|
34
34
|
|
|
35
35
|
from .engine import resolve_attribute
|
|
36
36
|
from .engine import resolve_item
|
|
37
|
+
from .engine import type_resolver_from_dataclass
|
|
37
38
|
from .engine import type_resolver_from_dict
|
|
39
|
+
from .engine import type_resolver_from_sqlalchemy
|
|
38
40
|
from .engine import Context
|
|
39
41
|
from .engine import Rule
|
|
40
42
|
|
|
@@ -45,3 +47,19 @@ from .errors import RuleSyntaxError
|
|
|
45
47
|
from .errors import SymbolResolutionError
|
|
46
48
|
|
|
47
49
|
from .types import DataType
|
|
50
|
+
|
|
51
|
+
__all__ = (
|
|
52
|
+
'AttributeResolutionError',
|
|
53
|
+
'Context',
|
|
54
|
+
'DataType',
|
|
55
|
+
'EngineError',
|
|
56
|
+
'EvaluationError',
|
|
57
|
+
'Rule',
|
|
58
|
+
'RuleSyntaxError',
|
|
59
|
+
'SymbolResolutionError',
|
|
60
|
+
'resolve_attribute',
|
|
61
|
+
'resolve_item',
|
|
62
|
+
'type_resolver_from_dataclass',
|
|
63
|
+
'type_resolver_from_dict',
|
|
64
|
+
'type_resolver_from_sqlalchemy',
|
|
65
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# PLY (Python Lex-Yacc) Version 3.11
|
|
2
|
+
|
|
3
|
+
[](https://travis-ci.org/dabeaz/ply)
|
|
4
|
+
|
|
5
|
+
Copyright (C) 2001-2018
|
|
6
|
+
David M. Beazley (Dabeaz LLC)
|
|
7
|
+
All rights reserved.
|
|
8
|
+
|
|
9
|
+
Redistribution and use in source and binary forms, with or without
|
|
10
|
+
modification, are permitted provided that the following conditions are
|
|
11
|
+
met:
|
|
12
|
+
|
|
13
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
14
|
+
this list of conditions and the following disclaimer.
|
|
15
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
16
|
+
this list of conditions and the following disclaimer in the documentation
|
|
17
|
+
and/or other materials provided with the distribution.
|
|
18
|
+
* Neither the name of the David Beazley or Dabeaz LLC may be used to
|
|
19
|
+
endorse or promote products derived from this software without
|
|
20
|
+
specific prior written permission.
|
|
21
|
+
|
|
22
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
23
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
24
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
25
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
26
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
27
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
28
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
29
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
30
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
31
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
32
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|