ezrules
Website & live demo · Documentation · Blog
Open-source transaction monitoring for teams that need clear rule control, auditability, and fast operational changes.
ezrules gives fraud, risk, and compliance administrators a web workspace for managing decision rules without turning every policy update into an engineering project. Rules can be drafted, tested, reviewed, promoted, paused, rolled out, and audited from one place, while your systems keep sending events to a simple evaluation API.
Why Teams Use It
- Own the rule lifecycle. Create rules, keep drafts separate from live logic, pause risky rules, restore older revisions, and promote changes deliberately.
- See what happened. Review canonical served decisions, the outcome returned, every rule that fired, and the exact event version those rules used.
- Work the exceptions. Turn non-neutral decisions into resolvable cases, track rescoring changes, and publish case/evaluation events to external systems.
- React to outcome spikes. See new alert incidents in the live notification badge and open the affected cases directly from a bounded, scrollable inbox.
- Improve rules with evidence. Use labels, precision/recall reports, backtests, shadow rules, and percentage rollouts before changing production decisions.
- Use reproducible historical features. Computed counts, distinct values, sums, averages, extrema, standard deviation, and days-since features follow documented point-in-time, correction, null, and type semantics.
- Run with admin controls. Manage roles, permissions, API keys, outcomes, user lists, field types, traffic persistence, and audit history inside the product.
- Self-host it. Run the full stack yourself with PostgreSQL, Redis, FastAPI, Celery, and the web UI.
Demo
The demo stack starts with sample rules, outcomes, labels, and evaluated events.
git clone https://github.com/sofeikov/ezrules.git
cd ezrules
docker compose -f docker-compose.demo.yml up --build
Then open:
| Service | URL |
|---|---|
| Web UI | http://localhost:4200 |
| API | http://localhost:8888 |
| Mail UI | http://localhost:8025 |
Login with admin@example.com / admin.
To stop and remove the demo data:
docker compose -f docker-compose.demo.yml down -v
Trace A Decision Field By Field
Product Tour
Manage Live Rules
Create and maintain the rule set from a reviewable UI. Active rules, drafts, ordering, lifecycle actions, and rule status are visible in one place.
Monitor 30-Day Activity
Switch the dashboard to the 30-day window to review sustained traffic and outcome patterns instead of a single point-in-time snapshot.
Inspect Rule Logic And Performance
Each rule has its own detail view with source logic, test payloads, historical revisions, backtesting, hit/outcome performance, and recent transactions that triggered the rule.
Review Tested Events
The Tested Events view connects decisions back to the raw payload, triggered rules, labels, resolved outcomes, and nearby entity relationships. Referenced fields are highlighted so an admin can see why a rule fired, while the event graph shows related traffic through shared users, cards, devices, merchants, and other configured entities.
Expand Event Relationships
Click an entity node in the graph to expand nearby transactions that share that customer, account, card, device, merchant, or another configured entity.
Measure Rule Quality
When events are labeled, ezrules can compare outcomes to ground truth and rank rules by precision, recall, F1, true positives, false positives, and false negatives.
Validate Candidate Changes Safely
Use shadow mode when you want observe-only comparison, and use rollouts when a candidate rule should serve a controlled share of live traffic.
How It Fits Into Your System
Your application sends an event to ezrules, and ezrules returns the resolved outcome.
curl -X POST http://localhost:8888/api/v2/evaluate \
-H "Content-Type: application/json" \
-H "X-API-Key: <api-key>" \
-d '{
"transaction_id": "txn_123",
"effective_at": "2026-04-23T12:00:00Z",
"event_data": {
"amount": 875.50,
"currency": "EUR",
"customer_country": "US",
"shipping_country": "MX",
"has_3ds": 0
}
}'
The result is stored for review in the UI, including the winning outcome and the rules that contributed to the decision. Non-neutral decisions can also become case work items, while evaluation and case lifecycle events are available through the integration event stream.
Core Workflows
- Rule authoring: write rule logic with validation, observed field references, configured outcomes, and list references.
- Event testing: dry-run JSON events against the active rule set without storing them in Tested Events or analytics.
- Shadow deployment: observe what a rule would do on live traffic without changing production outcomes.
- Rule rollouts: send a stable percentage of traffic through a candidate rule before full promotion.
- Backtesting: compare proposed logic against historical events before release.
- Graph investigation: inspect connected events through configured entity links and use graph-derived stats inside rule logic.
- Labeling and quality reports: upload or assign labels, then measure how rules perform against known outcomes.
- Audit and access control: keep change history and separate admin, editor, and read-only responsibilities.
Documentation
- Quickstart
- Installation
- Configuration
- Admin guide
- Rule authoring
- Performance testing
- API reference
- Deployment guide
- What's new
The documentation site is also available at ezrules.readthedocs.io. Product articles and walkthroughs live on the ezrules blog.
Development
For contributors, the project uses Python 3.12, uv, FastAPI, SQLAlchemy, Celery, PostgreSQL, Angular, Tailwind CSS, and Playwright.
uv sync
uv run poe check
On Linux, install the Docker Compose plugin before using any of the docker compose commands; see Linux prerequisites.
Frontend dependencies live in ezrules/frontend/.
cd ezrules/frontend
npm install
npm start
See docs/contributing.md for contribution guidance, including local Playwright setup.
License
Apache License 2.0. See LICENSE.
Metadata
Release files for ezrules 1.29.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ezrules-1.29.4.tar.gz | 8.6 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ezrules-1.29.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 MB
Release files / ezrules-1.29.4.tar.gz
| Download URL | ezrules-1.29.4.tar.gz |
|---|---|
| Size | 8.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ea7862e442128f86134e6c6c3870e32393643d18ad572a1623718f9009bd6e9
|
|
BLAKE2b-256 checksum How to use checksums |
693a16923e57929f8dfdf15b7b489a62b5d699ada876efeb47d7cb5226e298a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ezrules-1.29.4-py3-none-any.whl
| Download URL | ezrules-1.29.4-py3-none-any.whl |
|---|---|
| Size | 727.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebd1c6e3acf7180c93cb0075a3a1ae8a1e584d03fa028df9f473bc9135b4d2b8
|
|
BLAKE2b-256 checksum How to use checksums |
cdc5fcc0dcc11f6ae54a34a88110a063bf88e6c7d5f3569a49ccdd14dd394fb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for ezrules 1.29.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.