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

Uploaded CPython 3.9+Windows x86-64

seine_rs-0.4.30-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.30-cp39-abi3-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.30-cp39-abi3-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: seine_rs-0.4.30.tar.gz
  • Upload date:
  • Size: 338.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.30.tar.gz
Algorithm Hash digest
SHA256 6da4c7ea6c3a13b3664f90c6142f184dcc3eebc8ec0afaa651f4354007cea4e9
MD5 9f074f4c2d86e17df80add5083259697
BLAKE2b-256 5bc71e53952ff73abed1cb521104de9509fb717f43c26efa566328e586bd33df

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.30-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.30-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 46c73c6d976fd712ceb424f819fea554406c0090cc95eca771028690783ddedf
MD5 46ab9029efd5cc949ca6362e1cbc2095
BLAKE2b-256 d7c50df46a708a8c363b44b8ca3f0442db4692f29d6a5bd97f1a380848de50c3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.30-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 dd0f0a63b19267f4a9e9ae8310629b7fc4052136824290be8fe2e03963768258
MD5 a26623c35ceb3064399a3728384aee35
BLAKE2b-256 93e895c0743ef589a07dd912538f43258f858f771e78929ff9083ca33569c3ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.30-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 53508380b0b89f36101cd34bb94c00baa1e8fab90e7c704d0c93654f5edcb98f
MD5 eaefe0c5a8054c2bcab171dd6f417210
BLAKE2b-256 f3324566b0e1e619195c4bcd08060566536503a410d8aeafcdf114ed5d0980e7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.30-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3d05553fae34bf242c9da97f85012498424ca115626689e9fdb38d9c15831860
MD5 a98b3efc5d37ff2ba804a943b77d5340
BLAKE2b-256 564f10b9c8f9c3e9ac980e16e7450f9c11d6c95414a69f5789632d3b27876d3f

See more details on using hashes here.

Provenance

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