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.36.tar.gz (375.6 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.36-cp39-abi3-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.9+Windows x86-64

seine_rs-0.4.36-cp39-abi3-manylinux_2_34_x86_64.whl (3.6 MB view details)

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

seine_rs-0.4.36-cp39-abi3-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.36-cp39-abi3-macosx_10_12_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: seine_rs-0.4.36.tar.gz
  • Upload date:
  • Size: 375.6 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.36.tar.gz
Algorithm Hash digest
SHA256 1dbec8f1d1dc010972fe4cf62e0cdfec835f6c0722810f49d6359d26c052abe9
MD5 80179d1a397e25ea9b01367b7d7c4729
BLAKE2b-256 626c5bd9827dfd4a6829d369b9c773d9368186a075e3e97dde52c2310d23226d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.36-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.0 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.36-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a1f54449ed4281ad058ec7d5050f48186e3114f014d56661e119650820044733
MD5 efebc9a502f8dd283bee28c3bdca999f
BLAKE2b-256 387d058b2ae33cb7ff7e41bc06c3ce394533fe0cfa8a16a44d2f4dcffa58e2a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.36-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 46a75480d9ce7cdb97bf2bde712c754465c77e09fca197fe03c7e9b79e14b689
MD5 864a5d7df7e1dfe894a8fc1cbc2b6c32
BLAKE2b-256 f74e0a7df1647c78fb70667f1a1e42d4d4a0d8ef7e0401e92dbc1a6dc4b24428

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.36-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a35781323d09c6d1d712295c30ccade659842824c8a86fbee1cf69350291f4e
MD5 afbf3901acb267f6136cf0d6c7ecc965
BLAKE2b-256 a609ac8a80617cf20293c9aa1781267d96bc5c7348290cfea069e29f80888838

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.36-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4781776d7d89b04972444ecb2f0809b85723764e038e6928ce58989aed29c09f
MD5 b56394ee1fe0bb481134375d28e60d05
BLAKE2b-256 08b49a159d04066834b113624328563a3e181bb6d1406a1dcdc7625527cb6cad

See more details on using hashes here.

Provenance

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