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

Uploaded CPython 3.9+Windows x86-64

seine_rs-0.4.5-cp39-abi3-manylinux_2_34_x86_64.whl (1.6 MB view details)

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

seine_rs-0.4.5-cp39-abi3-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.5-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.5.tar.gz.

File metadata

  • Download URL: seine_rs-0.4.5.tar.gz
  • Upload date:
  • Size: 263.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.5.tar.gz
Algorithm Hash digest
SHA256 ae8741dc38f4e4a545924c9f6be9cfca7663e1cc11a7c29ca8b1c58c6d2d403b
MD5 be867a4b1dce8dd0786091a0ae4b3e77
BLAKE2b-256 8e2fe77975d16dab46dea00b22f33a33f3014f8f7978b78e6eb47cb67e20f584

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.5-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.5-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 34207ceab73fc32dd60c5ced13ef644d153c30c5fdd4e9f277d23a2efb7e5501
MD5 07b25e4fb6b39c209dfdc9a5a9d6b879
BLAKE2b-256 1412eba12013a8445ca5908d302aa1d905c48feef949f737a05d09a6a5ab80b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.5-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 124d674cf4912ad157037b29f4306ec25eb12e72a90edae9c801e1de9c8ee0f5
MD5 21e2367d31bbb1adcbd6bf5fe7cea22a
BLAKE2b-256 270fbe4c3d7c92dd910cf2e51edbc7ddec69e5f4fe5f70439a2cfeb53ae40913

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.5-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e3dddec637f8505b739f887365e11a9716c70fffd1e2d6ef7148a9ca6358dc0
MD5 dcb6fda2190ae605e868fbb1d81d308a
BLAKE2b-256 02e27712700c08d9e74077a6adcd10608b3008bd4f45589c8291f5a7170d1799

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.5-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ccc478700d1083edb455c8548ba3bdd7d1b888477b3b660fa32d2a7898794ba4
MD5 156dee2c94e6266c0c8372f40cdcd8a7
BLAKE2b-256 f3b7fec84533c3e7a2808e6c83874dc5e65c8f7c269b5805346223e103e0f0ee

See more details on using hashes here.

Provenance

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