Runtime Model
Pick the right runtime shape: embedded Python, embedded C++, IO module, local agent, or Kubernetes deployment.
BlazeRules has one rule engine and several ways to feed it.
| Runtime | What it is | Use it when |
|---|---|---|
blazerules Python module | Direct Python binding to the engine. | Applications that already control batching or use PyArrow/JSON. |
| C++ library | Native API for embedding in a service. | In-process integration with a C++ service. |
blazerules CLI | Native batch/stream command using the core and IO stack. | Validation, evaluation, backtesting, and streaming without Python code. |
blazerules_io | Kafka, binary decoders, file readers, CDC helpers. | Broker, file, and format adapters with application-owned control flow. |
blazerules_agent | Local ingest binary for HTTP, stdin, and file tails. | A small local collector without application code. |
blazerules_dashboard | Read-only UI over decision/DLQ/metrics/result files. | Local inspection of decisions, models, rules, and failures. |
| Helm chart | Agent DaemonSet plus dashboard Deployment. | Node-local Kubernetes log collection. |
Embedded Python
import blazerules
engine = blazerules.RuleEngine()
engine.load_rules("rules.yaml")
result = engine.evaluate_ndjson(payload)This mode fits applications that already hold events in memory and can call the engine once per batch.
IO Module
import blazerules_io
payload = blazerules_io.read_ndjson_bytes("s3://bucket/events/day.ndjson")This mode provides file, Kafka, CDC, and binary decoding helpers while leaving control flow with the application.
Native CLI
blazerules eval --rules rules.yaml --input arrow-ipc --path events.arrow --output grouped-decisions
blazerules stream kafka --rules rules.yaml --brokers localhost:9092 --input-topic transactions --format protobuf --descriptor schema.desc --message payments.TransactionThis mode exposes the same data-plane capability as the Python package through files, stdin, S3 objects, or Kafka topics. Python-only in-memory objects such as pyarrow.RecordBatch map to CLI transports such as Arrow IPC, Parquet, or CSV.
Agent
blazerules_agent --rules rules.yaml --input http --port 9480 --output ndjson --output-path decisions.ndjsonUse the agent for local log-style ingestion: HTTP /v1/logs, stdin, or file tails. The agent still evaluates in batches; it is not a per-record rule server.
Dashboard
blazerules_dashboard \
--decision-log decisions.ndjson \
--dead-letter-log dead_letters.ndjson \
--rules rules.yamlThe dashboard is read-only. It does not mutate rules or engine state.
Kubernetes
The Helm chart runs the agent as a DaemonSet and the dashboard as a Deployment. The default mode tails container logs from each node and writes decision/DLQ files under /var/log/blazerules.
See Kubernetes Log Ingestion and Deployment.
Updated about 2 months ago