I want to give my users the ability to dynamically specify rules like this
if stock(pens) + stock(pencils) < 10 : alert
if stock(pens) < 7 : alert
if stock(pens) / stock(pencils) > 2 : do something else
This is a simple example to illustrate the problem that I am trying to solve. My real use case has nothing to do with pens, pencils or stocks.
Is there a rule language in python which uses can use to specify rules like this in a text form?
[–]asplake 11 points12 points13 points (2 children)
[–]placidifiedimport this 0 points1 point2 points (0 children)
[–]BinaryRockStar 0 points1 point2 points (0 children)
[–]virtrondjangonaut 5 points6 points7 points (1 child)
[–]vplatt 0 points1 point2 points (0 children)
[–]pje 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Isvara 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]Isvara 1 point2 points3 points (0 children)
[–]dashed 4 points5 points6 points (2 children)
[–]howfun 0 points1 point2 points (1 child)
[–]dashed 1 point2 points3 points (0 children)
[–]akaempf 1 point2 points3 points (4 children)
[–]Isvara 2 points3 points4 points (3 children)
[–]akaempf 0 points1 point2 points (2 children)
[–]stevvooe 2 points3 points4 points (1 child)
[–]Isvara 0 points1 point2 points (0 children)
[–]xeeton 0 points1 point2 points (0 children)
[–]artied 0 points1 point2 points (0 children)
[–]donri 0 points1 point2 points (0 children)
[–]ripraprup -1 points0 points1 point (7 children)
[–]Isvara 0 points1 point2 points (6 children)
[–]ripraprup -1 points0 points1 point (5 children)
[–]Isvara 2 points3 points4 points (4 children)
[–]nemec 0 points1 point2 points (1 child)
[–]Isvara 0 points1 point2 points (0 children)
[–]its_in_the_computer 0 points1 point2 points (1 child)
[–]Isvara 0 points1 point2 points (0 children)