--- id: business-rules version: "1.1.1" license: MIT license_treatment: permissive maintenance: dormant --- # business-rules — Python DSL for setting up business intelligence rules that can be configured without code License: permissive · Maintenance: dormant · Downloads: 180.0K/mo ## What it is and what it does business-rules is a rules engine that decouples business logic from code deployment. You define a set of variables (computed properties of your domain objects) and actions (side effects to trigger), then write rules as JSON objects specifying conditions over those variables and which actions to run. The engine evaluates the conditions and executes matching actions without requiring code changes or redeployment. It's designed for scenarios where non-technical stakeholders (analysts, business users) need to configure system behavior—such as eligibility rules for discounts, automated workflows triggered by state changes, or marketing logic. The package exports metadata about available variables, operators, and actions so a UI can be built to let users compose rules visually. It depends only on six for Python 2/3 compatibility. Use it for: - Define marketing eligibility rules (e.g., discount thresholds) that analysts can adjust without code deployment - Automate email triggers or notifications based on user state transitions or event sequences - Configure inventory management rules (e.g., reorder when stock falls below threshold) dynamically - Build a rule-based workflow system where business teams can add conditional logic without engineering involvement - Export rule metadata to a web UI so non-developers can visually compose and test business rules ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python DSL for defining business rules as JSON that can be executed without redeploying code, letting non-developers configure system behavior through conditions and actions. Yes, if you need a lightweight rules engine for non-developers to configure business logic without code changes. The package is stable (no known vulnerabilities, low install friction, permissive license) but dormant—last release was 2022-03-18. It works well for straightforward condition-action rules; evaluate whether its feature set and Python version support align with your project before committing to long-term use. ## Install pip install business-rules uv add business-rules poetry add business-rules ## Installing business-rules Before you install: Low friction install with a single runtime dependency (six). Maintenance is dormant—last release was 2022-03-18—but the repository remains active with recent commits and 991 stars, suggesting the package is stable rather than abandoned. License in practice: MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install business-rules from business_rules import run_all from business_rules.variables import BaseVariables, numeric_rule_variable from business_rules.actions import BaseActions, rule_action class MyVariables(BaseVariables): @numeric_rule_variable def my_value(self): return self.value class MyActions(BaseActions): @rule_action(params={}) def my_action(self): pass rules = [{"conditions": {"all": [{"name": "my_value", "operator": "greater_than", "value": 5}]}, "actions": [{"name": "my_action", "params": {}}]}] run_all(rule_list=rules, defined_variables=MyVariables(), defined_actions=MyActions()) Verify before relying: - Whether the package works reliably with Python versions beyond 3.7 despite requires_python allowing current versions - Performance characteristics when evaluating large rule sets or complex nested conditions - Whether the package is actively maintained or in long-term stable maintenance mode given dormant status since 2022-03-18 ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 180.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags business rules engine python, rule-based decision logic, dynamic business logic without code, condition-action rule system, configurable workflow rules, rule engine DSL, business intelligence rules, rule-engine, business-logic, no-code-config [View on SkillFed](https://skillfed.io/packages/business-rules) · [View on PyPI](https://pypi.org/project/business-rules/)