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.17.tar.gz (282.4 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.17-cp39-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9+Windows x86-64

seine_rs-0.4.17-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.17-cp39-abi3-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.17-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.17.tar.gz.

File metadata

  • Download URL: seine_rs-0.4.17.tar.gz
  • Upload date:
  • Size: 282.4 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.17.tar.gz
Algorithm Hash digest
SHA256 3ef46489cfba03bca298528e1cddc9c2359c47284d054a4e4d56a30147cdc95e
MD5 877a2aec8bc4f42657a78e683bda7c45
BLAKE2b-256 6eb96300cc4b0004839effa6329800c4ab0fdfce97a979d8a63732fc7e8e26b0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.17-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.17-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b30fad50e85215565b1e9cfb68e8da229dab5ad78840df287c2f1ce235b6cf9c
MD5 fe7246a9bb3e6d3843c1dc8708fad4e2
BLAKE2b-256 11cdfbdece7509204ad2a7c1c2d4c9e32ef598a1d72513bf9880d807e24e7cba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.17-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a61f66699a8c627f1a524564b946f76542981a054c1bfff6454763bde684de91
MD5 80619d1d7c694399f641e14ae5e22a2c
BLAKE2b-256 24bb8753bd32646b41fba4c93155e421c67519abfc60781a94f9916c894d4855

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.17-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 936904f154d12d51b0156cc399b88d203244ee396c28fddb06aded6f149107f7
MD5 3e37ee6ba7cc078eb17aded0af73fd97
BLAKE2b-256 aae6ae21afd312d35e5296b60da1b36c4008515ba1edf26d01d6d33817a55622

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.17-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f77641dc0fe2fa7822ba0301c4520ca9e1d9564f2c4b100c9dc8b5d61a9bfd15
MD5 ecd382993bcb83605a8dbe0570466ed3
BLAKE2b-256 28f04d1f4b36799f77b3670df72e4e2eeb74ad6900b9de6b2e1cc8ad7093b841

See more details on using hashes here.

Provenance

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