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.24.tar.gz (298.9 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.24-cp39-abi3-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.24-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.24.tar.gz.

File metadata

  • Download URL: seine_rs-0.4.24.tar.gz
  • Upload date:
  • Size: 298.9 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.24.tar.gz
Algorithm Hash digest
SHA256 f8ea896b50029ee94acfbf6c71c83567e4c1d40544baa2f38e827349fecc9a7e
MD5 f3373de443497440bd5ea8cedbb08569
BLAKE2b-256 91801900324ac518ca2fe6e80cd856d74e5820bf0c43c0cf3ba7d781d54d16d2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.24-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.3 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.24-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d0ec903cc7ce36ebfd66677ba3a390c2932867200a1fd5e277b96283e8207e34
MD5 5a14144d24cf1e8363a4f756042ea54b
BLAKE2b-256 cd9efef4a4001dde2402303582f4eaf7134e837834d0466658beb30b669fdf1f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.24-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6b0ce837b270715c691c2ffcf1e8f9b84758481cccb4382f1f987232e9082b17
MD5 95977eca65fd87f6450d8e8b38c04425
BLAKE2b-256 2ed980df90c7017793694088065792f3a37e2e35ba8555f0e868d442f5a773f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.24-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 da7d3ebe39aa2973d3f6d19b26231a204763d2d2568d9c8022df826897bf63c3
MD5 3431ba45a1e064ff55e564e8cd03e36c
BLAKE2b-256 c745f249cf0cdf2415aabe94360a84325ebc9d6a53fc0b547b9902663ca32a5e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.24-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5e772acf5b3e8fee361eb81a5969295ca2df652d6d704f85fe67c1618a4ca991
MD5 2052327ecd49ee274c84329bc46c7531
BLAKE2b-256 b9f75013bf041c25e19236c0b1f9f671c3a81f9ca5eac5c164fd642360c5881a

See more details on using hashes here.

Provenance

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