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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.9-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.9.tar.gz.

File metadata

  • Download URL: seine_rs-0.4.9.tar.gz
  • Upload date:
  • Size: 270.1 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.9.tar.gz
Algorithm Hash digest
SHA256 6caf8e543029bc8f9d717c351002dd6f111ef5b649c00bc288d219377ffe8489
MD5 a06b3786bf08fc12875a0573c352e51d
BLAKE2b-256 498c19378e8d1d16afdf1265a47df26af3a34cb8125e67245c5bb32766f2cea5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.9-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.9-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cd04de18f1bfba5b42bd959fd6491da515fadf2e7dcbaeea4a51ac3d363d11bc
MD5 e56556de4b4f25390a2b7238109a5fac
BLAKE2b-256 4287cd6d139e1890a891e188dee087da672d7e7f04dbb00347c978122a5bd059

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.9-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2f2506db8f382f7478908ecd10a68d17ead0ff8ece1d5e40df411c656efef7bd
MD5 4ff0cf9bfe4f23d47bebc4b189f2d6ff
BLAKE2b-256 bbe550a3e073e5a63eb93b5ba1573acc97b1d42e7dd58c9ed125fb9373e2707b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.9-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 04d0fc8aec4bc54f003725ced4d903fb449f71cd9c462537bd2c5079916bf5a3
MD5 aeb9d3e2cd74aa11cd29adb448e09f47
BLAKE2b-256 4d0fe94c5b475c7907b8ff574f084c73650e2e7e536c1f14a913d926284ba3a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.9-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8cda6bf27b4f7f175eb60b0571524955a95f4ea265a618dff8b96ee323fb2b12
MD5 f9498f1cca244d1d6f505dd9826c0a3f
BLAKE2b-256 e59c40d91543883e7b0feb8d80734065d2962c6b05483c72f4a9fd6a48270522

See more details on using hashes here.

Provenance

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