Skip to main content

regorus

Regorus is

  • Rego-Rus(t) - A fast, light-weight Rego interpreter written in Rust.
  • Rigorous - A rigorous enforcer of well-defined Rego semantics.

Regorus can be used in Python via regorus package. (It is not yet available in PyPI, but can be manually built.)

See Repository.

Automation

Run cargo xtask build-python to produce wheels via maturin, or cargo xtask test-python to reinstall the package locally and execute the sample script and pytest suite.

To build this binding, see building

Usage

import regorus

# Create engine
engine = regorus.Engine()

# Load policies
engine.add_policy_from_file('../../tests/aci/framework.rego')
engine.add_policy_from_file('../../tests/aci/api.rego')
engine.add_policy_from_file('../../tests/aci/policy.rego')

# Add policy data
data = {
  "metadata": {
    "devices": {
      "/run/layers/p0-layer0": "1b80f120dbd88e4355d6241b519c3e25290215c469516b49dece9cf07175a766",
      "/run/layers/p0-layer1": "e769d7487cc314d3ee748a4440805317c19262c7acd2fdbdb0d47d2e4613a15c",
      "/run/layers/p0-layer2": "eb36921e1f82af46dfe248ef8f1b3afb6a5230a64181d960d10237a08cd73c79",
      "/run/layers/p0-layer3": "41d64cdeb347bf236b4c13b7403b633ff11f1cf94dbc7cf881a44d6da88c5156",
      "/run/layers/p0-layer4": "4dedae42847c704da891a28c25d32201a1ae440bce2aecccfa8e6f03b97a6a6c",
      "/run/layers/p0-layer5": "fe84c9d5bfddd07a2624d00333cf13c1a9c941f3a261f13ead44fc6a93bc0e7a"
    }
  }
}
engine.add_data(data)

# Set input
input = {
  "containerID": "container0",
  "layerPaths": [
    "/run/layers/p0-layer0",
    "/run/layers/p0-layer1",
    "/run/layers/p0-layer2",
    "/run/layers/p0-layer3",
    "/run/layers/p0-layer4",
    "/run/layers/p0-layer5"
  ],
  "target": "/run/gcs/c/container0/rootfs"
}
engine.set_input(input)

# Eval rule
value = engine.eval_rule('data.framework.mount_overlay')

# Print value
print(value)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gordon_to_regorus-0.11.0.tar.gz (3.9 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gordon_to_regorus-0.11.0-cp310-abi3-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10+Windows x86-64

gordon_to_regorus-0.11.0-cp310-abi3-manylinux_2_34_x86_64.whl (3.6 MB view details)

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

gordon_to_regorus-0.11.0-cp310-abi3-manylinux_2_34_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.34+ ARM64

gordon_to_regorus-0.11.0-cp310-abi3-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

gordon_to_regorus-0.11.0-cp310-abi3-macosx_10_12_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file gordon_to_regorus-0.11.0.tar.gz.

File metadata

  • Download URL: gordon_to_regorus-0.11.0.tar.gz
  • Upload date:
  • Size: 3.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gordon_to_regorus-0.11.0.tar.gz
Algorithm Hash digest
SHA256 1e902641ddcc185392408b70f62d0d77c89a286d8da4542e11e06a037bafbeb3
MD5 d62f05e1c9a5c5113747fe6a014da26b
BLAKE2b-256 a58422735b8c3804782ff698735df5427c617f05fbb92f55d79e549f19a32c5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gordon_to_regorus-0.11.0.tar.gz:

Publisher: publish-python.yml on gordon-to/gordon-to-regorus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gordon_to_regorus-0.11.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for gordon_to_regorus-0.11.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 26f4577779e47a5410dabef7d0abe68d4f62bc5aa73e663ce88293b1944df446
MD5 0c6535604cfcb79695f1d32d29a5889d
BLAKE2b-256 060e7d4eaabf89533ee8cf23764606227f12aa04053fa03d179d5de6125f18c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gordon_to_regorus-0.11.0-cp310-abi3-win_amd64.whl:

Publisher: publish-python.yml on gordon-to/gordon-to-regorus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gordon_to_regorus-0.11.0-cp310-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for gordon_to_regorus-0.11.0-cp310-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ddf1f418721f9c97e8101d63a8a5a1fb6bf501fd5368b7eff7bf4b5193a6c82f
MD5 e79b750b821201dfec3016f52f86c8fa
BLAKE2b-256 7b849304e7e74a18a125cf2df22b7a93e753699f4b19c88d10a5f3b386fb4e76

See more details on using hashes here.

Provenance

The following attestation bundles were made for gordon_to_regorus-0.11.0-cp310-abi3-manylinux_2_34_x86_64.whl:

Publisher: publish-python.yml on gordon-to/gordon-to-regorus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gordon_to_regorus-0.11.0-cp310-abi3-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for gordon_to_regorus-0.11.0-cp310-abi3-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 1be96d158b78f35937f4517f3faad919c4979811673218ef42ee856565f6d997
MD5 595c55c3d35379e66cdbed1414256a85
BLAKE2b-256 a063e79612d76cde9411dcbcbd4120505bade9133b83ea969aae12997e98a6d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for gordon_to_regorus-0.11.0-cp310-abi3-manylinux_2_34_aarch64.whl:

Publisher: publish-python.yml on gordon-to/gordon-to-regorus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gordon_to_regorus-0.11.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gordon_to_regorus-0.11.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a07eabfa38d151334e7ba35cc22c393c7de50cf7ae5a19d827af7c9913417718
MD5 d1a0b829922ba64c63c87a4e4bf0e4da
BLAKE2b-256 8beb9a3a333035d4154619108a3df3a4cf23365272589db0053339524b179598

See more details on using hashes here.

Provenance

The following attestation bundles were made for gordon_to_regorus-0.11.0-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: publish-python.yml on gordon-to/gordon-to-regorus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gordon_to_regorus-0.11.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for gordon_to_regorus-0.11.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 54e257c96932c5b9f305a9e8aeb8d1cf2efcbe21bf2015b335b6122df0e3bc3e
MD5 57ab0d8e72ecf37566b3e673a32c1ced
BLAKE2b-256 0030b2f99e661a66d9f5fd1d107bead8147e4525199cdd8f9400220864ddcfcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for gordon_to_regorus-0.11.0-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: publish-python.yml on gordon-to/gordon-to-regorus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.11.0 This release

6 files

0.10.1

6 files

0.10.0

6 files

0.9.1

6 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page