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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.19-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.19.tar.gz.

File metadata

  • Download URL: seine_rs-0.4.19.tar.gz
  • Upload date:
  • Size: 282.7 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.19.tar.gz
Algorithm Hash digest
SHA256 1d4aa7a340f46b72eec7190e004a3bd6d434395e5bc9057fc906f0bf4f9123d2
MD5 54b91d7e44a2963e72a0632b280dfb8a
BLAKE2b-256 3a19d63a309d723c69e79d458999d269c33311cb408fe0bde58ca613ab2fe5b5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.19-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.19-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9196a65e446c9ef7c1be56f4b94ec010140b3428e617259f99c55c9f062c0c6d
MD5 0a0347da51d869c15d2c23844264da6b
BLAKE2b-256 3eb545e2b51325dc159c559cd94fbaecc57a91781f07e31fffce764c9d605900

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.19-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9118e09cd01973e908e91067d8c72278fa7223d9b1bd3c9cd4a9310f8b247864
MD5 4f3bd30ae57bd3171550e646d9024751
BLAKE2b-256 2135195163e64629435ed46e6cb6b12cc577b2fbb4f96f2f1c5d36bd05239dad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.19-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eefb67d4320cc0435c6460efb7c4882d113e3312c2ced6958ba06f769fdbdc0e
MD5 c386d1e26eb83de8fcbfb7e5368928bc
BLAKE2b-256 f13d30bfd30bb3c818a49a82c5df8fc5110228ff9d6a92da664bae991ee59c05

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.19-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fbaaed9abd013d2c893952fe9c5cbc14d6b86665aeb1b6a071336f34bb3a9a61
MD5 edd9ffc8f72b153b278b6fb5f2f269ee
BLAKE2b-256 97652a077c24430000ed940ea0a0d477bd7b78087ba7f073afe3b5b9391b349b

See more details on using hashes here.

Provenance

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