Skip to main content

Differentially certified Drools-subset rule engine over Arrow dataframes

Project description

seine-rs

A rules/decisioning engine over Arrow dataframes — a Rust port of a bounded Drools (DRL) subset, differentially certified against real Drools 9.44.0.Final: every supported behavior is pinned by running the same scenarios through both engines, plus multi-seed fuzz campaigns (zero divergences to completion).

import polars as pl
import seine
from seine import Rule, fact

@fact
class Person:
    name: str
    age: int
    score: float

@fact
class Flagged:
    name: str
    score: float

adults = Rule("Adults")
p = adults.when(Person, Person.age >= 18)
adults.then_insert(Flagged, name=p.name, score=p.score)

people = pl.DataFrame({"name": ["ada", "kurt"], "age": [36, 17], "score": [91.5, 99.0]})
res = seine.run([adults], {Person: people, Flagged: []})

pl.DataFrame(res.derived()["Flagged"])   # facts the rules created
pl.DataFrame(res.firings())              # full audit trail
  • Bulk, columnar boundary: Arrow tables in (polars / pyarrow / pandas ≥ 2.2, zero-copy via the PyCapsule interface), Arrow tables out. Row-object lists (@fact instances, dicts, dataclasses, Pydantic models) work too.
  • Rules in Python or DRL: the Python builder compiles to DRL text, so both paths run the identical certified engine. Anything outside the certified grammar is a definition-time CompileError.
  • Full working-memory lifecycle: insert → fire → update/delete by handle → fire, each certified differentially.
  • No Python in the hot path: conditions, aggregates and salience are native; callbacks are observers over immutable results.

Install: pip install seine-rs — the import is import seine.

Source, scenario corpus, and the full decision log (D-001…D-048): https://github.com/sl-agentics/seine

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seine_rs-0.4.3.tar.gz (258.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

seine_rs-0.4.3-cp39-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9+Windows x86-64

seine_rs-0.4.3-cp39-abi3-manylinux_2_34_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ x86-64

seine_rs-0.4.3-cp39-abi3-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.3-cp39-abi3-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file seine_rs-0.4.3.tar.gz.

File metadata

  • Download URL: seine_rs-0.4.3.tar.gz
  • Upload date:
  • Size: 258.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for seine_rs-0.4.3.tar.gz
Algorithm Hash digest
SHA256 29784790ab7c354fb991ff555dc5c8e8b2acd9a688ed03e376b9c4ae368f137e
MD5 1c16cc8a3ccb4a08ab2cb7278dfaa90a
BLAKE2b-256 1d01d4b2016282b0256ea7ce6a1819303ae96bf6bbbb8bf131413ef18059218e

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.3.tar.gz:

Publisher: ci.yml on sl-agentics/seine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file seine_rs-0.4.3-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: seine_rs-0.4.3-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for seine_rs-0.4.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0924e0083c32b048820d852f138194119b8402fbb2585dbdb4b25e3a58c8ee88
MD5 8ea992caf24cad5022f581107f660ce1
BLAKE2b-256 26d90d48e05ac665a5b75f946fc3f8c694341885ffb8cb87d90a0aac5df30366

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.3-cp39-abi3-win_amd64.whl:

Publisher: ci.yml on sl-agentics/seine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file seine_rs-0.4.3-cp39-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for seine_rs-0.4.3-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 dcde39e3388b54ca747f2817df228ec55ed2eecd22133a1c9cab7c166f91d52d
MD5 d37a25e7b1a3b7b8aad147da8efe3522
BLAKE2b-256 f6aac0fe36e786ee8bace356d6b9a3ae12ef1ee860d5db203caef9ec103c2f3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.3-cp39-abi3-manylinux_2_34_x86_64.whl:

Publisher: ci.yml on sl-agentics/seine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file seine_rs-0.4.3-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for seine_rs-0.4.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b5d75ecc6d33c724709fbd4cdf695f5eea1c4f8de8de073c320b146bea4628ef
MD5 8469b66624bcf1a19e49959d0ab08ca0
BLAKE2b-256 191ac060e4152ce96362f1919eac575d251a8012c8a1d0763f74ea254016f3d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.3-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: ci.yml on sl-agentics/seine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file seine_rs-0.4.3-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for seine_rs-0.4.3-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e40b1895ca1228aa881f38d40c14f102493b4a303110cdaa44f30d774c3257ca
MD5 a6a658f0c0668967e22a0deaeac894f4
BLAKE2b-256 3e02f91f5fabcd32706357b138b741647046b7c6acd6547bd05b9b14ef054def

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.3-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: ci.yml on sl-agentics/seine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page