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_rs
from seine_rs 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_rs.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_rs.

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.23.tar.gz (295.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.23-cp39-abi3-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9+Windows x86-64

seine_rs-0.4.23-cp39-abi3-manylinux_2_34_x86_64.whl (1.7 MB view details)

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

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.23-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.23.tar.gz.

File metadata

  • Download URL: seine_rs-0.4.23.tar.gz
  • Upload date:
  • Size: 295.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.23.tar.gz
Algorithm Hash digest
SHA256 74dd810ceb4827e7153b893cbc702fa863ee70ee5161c6d57a74533f91c545a9
MD5 44d852f6cf06da6956ebfb779b6e9786
BLAKE2b-256 dc487b5f75fa13355727bc68db3427b01185bad7d7fd5d4b258904f5f40fe614

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.23.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.23-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: seine_rs-0.4.23-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.3 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.23-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 de7f65781db0cb758e09b5cc48419da8e17184b324c40e8001401f68348ce5e1
MD5 109a68d9d2191f74540585a816f0b414
BLAKE2b-256 5fd2c9aa305e338fdce36b08c6f58f142568f13dbc81e68ee6827513e73b1b69

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.23-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.23-cp39-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for seine_rs-0.4.23-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8d23378f1d0eb98cb7189b432b275c3b9ad175d935e6b06c432e352c98c28493
MD5 385a09776c46540e1fc813cedff578d9
BLAKE2b-256 7577ecb4d62695a99e91cd9c320c4039a08c5850d6deeface8325fa9e00d62d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.23-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.23-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for seine_rs-0.4.23-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6a2eb9de09b344f912301de9e9b0b8da6b2363052da58e9b2c0ce8e107c03470
MD5 be3ade9a2c7af390f1f85353237f4b1c
BLAKE2b-256 9c0f52950aa66652c8681c592c8454e8ad3805504335c2d2361e5060e7add338

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.23-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.23-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for seine_rs-0.4.23-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 78bccbd9c9a8fe4d9d4b4e96bab88277ff696ddd93b97e486e24618d7ed9679c
MD5 3df8a904db370d75dbf4b83988cfd31d
BLAKE2b-256 4f9946ef2e16aed0a8e26fa8511844e4bccba3f6943106ce5d5a609fe9a2262f

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.23-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