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.33.tar.gz (364.2 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.33-cp39-abi3-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.9+Windows x86-64

seine_rs-0.4.33-cp39-abi3-manylinux_2_34_x86_64.whl (2.9 MB view details)

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

seine_rs-0.4.33-cp39-abi3-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.33-cp39-abi3-macosx_10_12_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: seine_rs-0.4.33.tar.gz
  • Upload date:
  • Size: 364.2 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.33.tar.gz
Algorithm Hash digest
SHA256 e04e4bda39a998b9543a9892217a40a9f1879298664b3fdd9d1e2ca50ccd111a
MD5 d970e0c1872ee53cc3dd7cf223cc2763
BLAKE2b-256 cca21a2517fbc92115ff1a3467ce88619ce89fa1c15f885fe945fc99da498256

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.33-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.4 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.33-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 341cb347e3e5cae26aa793bf0f9cebac5aa42c929a62bfb644e66e575782043d
MD5 19d1f2ed2b2c7448567049a48c9ab792
BLAKE2b-256 884ee45c62fde8699c18a8a9846ee60e4f56dc8b65ca40e357e60250c2693c80

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.33-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3b5145537fbda9b3b862c48fdcb7b00cfc0af1b5445944148d04728a84c22aa0
MD5 f76625fcb5a827553f1aeabc82c445b0
BLAKE2b-256 2b27096e397689dc16fe4f5116da2175a9108a4d722a2d47a211594dbad36376

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.33-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c5e513272346ee4004221e2c51e067d9bb1ed026a410250620f8e456eac7ad4
MD5 1c45edf60133fae9c386af739aef205f
BLAKE2b-256 69732c5f08270c172553696b57726bfbcf6c2458f3a0339a1734b0c045f0712a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.33-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 dd35961f064d60c89843977a30060d58d4e600aebcb3fc347a1f9e45e3b2fa51
MD5 5b53a7072a807cdb4e91c50e9ea91466
BLAKE2b-256 d643d811ab9b04b5e6622c29412671aa7f22b9b4bcf0527765c57c7f1280be0e

See more details on using hashes here.

Provenance

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