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.34.tar.gz (367.8 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.34-cp39-abi3-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.9+Windows x86-64

seine_rs-0.4.34-cp39-abi3-manylinux_2_34_x86_64.whl (3.6 MB view details)

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

seine_rs-0.4.34-cp39-abi3-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.34-cp39-abi3-macosx_10_12_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: seine_rs-0.4.34.tar.gz
  • Upload date:
  • Size: 367.8 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.34.tar.gz
Algorithm Hash digest
SHA256 8ddf2e9df9a530964e001fa7338b49be50646cf700c7bcaeb09151b9aee0c1d0
MD5 21d6794772e696b588bed5f471f3371e
BLAKE2b-256 c1c34d974d8a1f0f90bb99d8fcd8f606528a20572fa3dc9dab5a3fa0d22d7c01

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.34-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.0 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.34-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 edfcb9c1bb88ad8610d701bde137bc30e6ff05f4aa1f139a28b1e504fa7efc33
MD5 64a5667e7e9b07b677023c58e0b80c98
BLAKE2b-256 147f66904a4e4978702ce4d73c9c764f601d8cb806a2c158d794adced0f4c31a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.34-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7c8199ce88760b7515e324314333c02e92dea6577382c30f1ed309bc2d7bb417
MD5 58f85a54851da2dffb66a8c5b672444a
BLAKE2b-256 4e3ef57201e3a750669afd3a4aad9c9a587869dacb333806f7e4db65b1971d01

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.34-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 68de5c535206c4625e61b2d4afc7144c079402ea9a45e3f0d46f73ed6184099d
MD5 59de44fe737ec469a9d1d867765b6e7d
BLAKE2b-256 8c03bf6e2f7ee5ada9cc28b8357e091bd7d18604c41ca430f4f55ce3a690e8fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.34-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4fdec1c23fc6cf1000939bce99f54e2a147a78b7bbc0a61136a206d015848722
MD5 bf0b8121df7abc92ba2069071e3a970d
BLAKE2b-256 26222e8a2bd060ad9484d361f405756daa004e098d653076c3770d8cfca81772

See more details on using hashes here.

Provenance

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