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

Uploaded CPython 3.9+Windows x86-64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.21-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.21.tar.gz.

File metadata

  • Download URL: seine_rs-0.4.21.tar.gz
  • Upload date:
  • Size: 294.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.21.tar.gz
Algorithm Hash digest
SHA256 66984f36008e7c1abdaf3b5beec4bb15f5b293406a7e49a717c1c21757a4c0f5
MD5 e7735f962eb69eff1b21e638798dd5e7
BLAKE2b-256 1dc9a1c94affb880fe6a1b8126af0708f6a31db7e74dac70ea0f13f7a7fb3ab3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.21-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.21-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 30d88f9178030cf1cbcec07f012a9e039b4f79badaac979ebb91ecf452c1e829
MD5 9c28318a42fcc54b8669c73057b78021
BLAKE2b-256 4db495d897d078e827319f1966d9e7ed47303c0e015a89a3e597bb86bdca755c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.21-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 09a6ddcb9776bef5821878ac9870561780868ec60a82a5336050a0ad79c369e8
MD5 a4ac6c1e7f78735450d5166b9cb44fa0
BLAKE2b-256 102566b72c5142e1406b9859015c2a883b2b60ffaff72da76d901e512c52d339

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.21-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db42b1a645dbb544a5b9e10003a4780198b9f373bb1df23af303d4e27ab3b7e9
MD5 422c6b0d6c236822c4dd856d15110728
BLAKE2b-256 5ca3114062f2942de49c4da5762fe53e5b4f715e0355de9381d010b12b6d0bf4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.21-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5b3f8b519c91365f7068cad25aeade5408ec696294be29dffa554d252900a5e9
MD5 13e9b4d51d96dd5c7b147f1c08e1348e
BLAKE2b-256 964f3bf4c50ef4f5224bce3488902fb8c5607f355c7c8fb2ccd12377de25ad56

See more details on using hashes here.

Provenance

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