// the find
venmo/business-rules
Python DSL for setting up business intelligence rules that can be configured without code
A lightweight Python rule engine from Venmo that lets non-engineers define conditional business logic in JSON, with a Python DSL for declaring the available variables and actions. The core idea is clean: developers expose typed variables and actions via decorators, and rules get built by a UI and stored as JSON data rather than code. Fits small-to-medium automation problems where you want product/ops teams to configure logic without deploying code.
The decorator-based variable/action definition is genuinely ergonomic — the diff between 'code you write' and 'config non-engineers touch' is a clean API boundary. The `export_rule_data()` introspection method is a thoughtful feature; the backend tells the frontend exactly what's available, so the UI can't construct invalid rules. The operator set for `select_multiple` is surprisingly complete (`shares_at_least_one_element_with` etc.) for what looks like a small library. Test coverage exists and the CI is still running as of 2024.
The project is effectively unmaintained — 989 stars but last meaningful activity was years ago, with the 2024 push likely just dependency bumps. No support for nested condition groups beyond the flat `all`/`any` split, which breaks down fast on real-world business logic that has 3+ levels of nesting. The companion UI library (business-rules-ui) is a separate repo that looks even more abandoned, so you're writing your own frontend anyway. No async support — `run_all` is synchronous and blocking, which is a problem if your variable methods hit databases or external services.