# Rule engine

Keep business rules outside code and evaluate them from your services at runtime.

## Get started

Write your first ruleset, evaluate it from a service and change the rules without touching the code that uses them.

[Rule engine tutorial](https://zato.io/docs/rule-engine/tutorial.html)

service.py

```
# Evaluate rules kept outside your code
rule = self.rules.airport_01_Flight_Delays

result = rule.match(data)

result.then['send_notification']
True

result.then['template']
'DelayAlert'
```

## Rule engine

[Tutorial A ruleset file, a service that calls self.rules and a rule changed while the server keeps running.](https://zato.io/docs/rule-engine/tutorial.html) [Reference The full syntax of rules, conditions and the evaluation API.](https://zato.io/docs/rule-engine/reference.html) [Performance How fast rules evaluate and what affects their performance.](https://zato.io/docs/rule-engine/performance.html)
