Questions tagged [durable-rules]

durable_rules is a polyglot micro-framework for real-time, consistent and scalable coordination of events. With durable_rules you can track and analyze information about things that happen (events) by combining data from multiple sources to infer more complicated circumstances.

A full forward chaining implementation (Rete) is used to evaluate facts and events in real time. A simple meta-linguistic abstraction lets you define simple and complex rulesets as well as control flow structures such as flowcharts, statecharts, nested statecharts and time driven flows.

The durable_rules core engine is implemented in C, which enables fast rule evaluation as well as muti-language support.

9 questions
3
votes
1 answer

How do I get the JSON formof a Durable Rule in Python?

Our Python application currently loads Durable rules from a YAML file (which will soon be a database or Redis cache), then converts that YAML to JSON, before sending the JSON object to the Durable Rules engine for processing. I am refactoring this…
Paul Chernoch
  • 5,275
  • 3
  • 52
  • 73
2
votes
1 answer

Django rest-framework with durable_rules

I am trying to integrate durable_rules with my django restframework apis I need some guidance as to how to proceed with this Lets say, I have a class school , class student, class location class School(models.Model): schoolname =…
0
votes
0 answers

durable-rules loading ruleset from json file

I came across durable-rules (python) https://github.com/jruizgit/rules rule engine framework. I manage to write a dataset defined in Python code into a JSON file but cannot read it and execute it. Is it possible, and does anyone have an example of…
ninja
  • 13
  • 2
0
votes
1 answer

durable-rules python how to negate a statement

How do I negate a statement? https://pypi.org/project/durable-rules/ I would like something like this but the ! doesn't work. with ruleset('awv'): @when_all(m.visits.anyItem(item.cpt_codes.anyItem( item.matches('G0438') | item.matches('G0439')…
vee
  • 680
  • 1
  • 10
  • 27
0
votes
2 answers

Unable to install npm package - error with node-gyp

All I'm trying to do is installing an npm package called durable. I created a new empty folder and typed in npm install durable. The following errors occurred. I tried everything I could find online, I downloaded the VS build tools that include…
0
votes
3 answers

Python Durable Rules post json function and date formatting not working

Posting Json for durable rules does not allow to format date. Posting string into variable works. from datetime import datetime a="11-02-2020" start = datetime.strptime(a, "%d-%m-%Y") end = datetime.strptime("11-02-2020", "%d-%m-%Y") a= start >…
Kix
  • 1
0
votes
1 answer

How do you run the server to use/test the JSON format?

The Reference Manuak at https://github.com/jruizgit/rules/blob/master/docs/json/reference.md says that I can assert facts like this: curl -H "content-type: application/json" -X POST -d '{"subject": "Tweety", "predicate": "eats", "object": "worms"}'…
sureshvv
  • 4,234
  • 1
  • 26
  • 32
-1
votes
1 answer

Can't download durable using pip in cmd, the built in PyCharm terminal and by using PyCharm package manager

Error message in cmd: ERROR: Could not find a version that satisfies the requirement durable (from versions: none) ERROR: No matching distribution found for durable Error message in PyCharm terminal: File "", line 1 py -m pip install…
Wudanty
  • 31
  • 5
-1
votes
1 answer

Is Backward chaining supported? Are there any examples?

I am evaluating durable-rules against Drools and I see mention of "Backward chaining" in Drools documentation - but not in durable-rules. Is this feature supported by durable-rules? Is there an example?
sureshvv
  • 4,234
  • 1
  • 26
  • 32