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

Uploaded CPython 3.9+Windows x86-64

seine_rs-0.4.37-cp39-abi3-musllinux_1_2_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

seine_rs-0.4.37-cp39-abi3-musllinux_1_2_aarch64.whl (3.6 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

seine_rs-0.4.37-cp39-abi3-manylinux_2_28_x86_64.whl (3.6 MB view details)

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

seine_rs-0.4.37-cp39-abi3-manylinux_2_28_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.9+macOS 11.0+ ARM64

seine_rs-0.4.37-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.37.tar.gz.

File metadata

  • Download URL: seine_rs-0.4.37.tar.gz
  • Upload date:
  • Size: 376.2 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.37.tar.gz
Algorithm Hash digest
SHA256 3b77b4208b63cd143ed7536936a94e40bb99a12ed5a85feee5945537ce3e36fb
MD5 182d8abe6072a67199ec4f146eac8046
BLAKE2b-256 1cb7dc8beb269e2c7999fc0133357b736d37c64d2aaee094390dee9d4564600d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: seine_rs-0.4.37-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.37-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 51c4190b32b30d78ce9154006e5dc9f919772ba53846b3174072ccf890fdee8c
MD5 3a49891b7c900604f977d591aa97cc7f
BLAKE2b-256 8dd8442a7a68a1f7fdad3df52b3aec2c950c0aacaa7691538e9219f8eed35e91

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.37-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.37-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for seine_rs-0.4.37-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f74ddb63afe0c88b29ebce51c685dc7d3f64deb9b435bde4f65470ca75201c6e
MD5 b2a97e68a31d3ceba853f28b608154f1
BLAKE2b-256 c625bd73c8aba27fc51f36120be545fc84677368d4bc3a85a4cbfdbb846fb84b

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.37-cp39-abi3-musllinux_1_2_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.37-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for seine_rs-0.4.37-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 21e801d78a977ed15b5571b6828a2e5fb7ee26ff275e42507e4d4374fca1e026
MD5 fa4a31e62326799a88888a1634639cd3
BLAKE2b-256 b448177bf3ad26945eb5521a8366447f357daaf42a90bdc7fb57fd7bb16bbb6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.37-cp39-abi3-musllinux_1_2_aarch64.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.37-cp39-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for seine_rs-0.4.37-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e1a43642b7eb182d7947fc8be426a6d130abd93e8a0b86f7b9fbf44daa38ab0f
MD5 fe38fc91785b0498ce2cf2302a1bd737
BLAKE2b-256 c904819b67f63b080f7912a5c661a1da578174bf0c39903b30bce7ef08011d00

See more details on using hashes here.

Provenance

The following attestation bundles were made for seine_rs-0.4.37-cp39-abi3-manylinux_2_28_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.37-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for seine_rs-0.4.37-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 42baea928c0bb1124a5c9118ab64a655c61f6629354121d3eeda10c313a68c5a
MD5 2add78614451fda3bc189fb8c50cd261
BLAKE2b-256 a202227207e5d36884111421273352165639516000514d94644c87a439fb1e46

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.37-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 09f51e89430ffb53fc4ec13682a6278b5655c88b0eeb7fe705a233d0fcd10e06
MD5 ee33411612e418b029c4be318088b274
BLAKE2b-256 375158d54754d132db616554a1f3bf4711c0111b9fe2ceb94032dda154c2bb17

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for seine_rs-0.4.37-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2b34ff1c9da48c35a042ea0dd7eea412506f164b74c7327312dfc6759bd000f8
MD5 ffc426b2ae9ac8c922fb5b3dac62c56c
BLAKE2b-256 73d1ee89aad0d78376b6e9f40e046aaf524d970eee452a436dc52dcd6dd78778

See more details on using hashes here.

Provenance

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