regopy
Python interface for the OPA Rego Language and Runtime
Decision gist · record as of 2026-08-14
Yes, if you need to run Rego policies from Python. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and provides prebuilt wheels for common platforms. Medium install friction is typical for compiled packages and not a barrier. Start with it if you're already using or planning to adopt Rego for policy evaluation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; prebuilt wheels are available for macOS (arm64, x86_64), Linux (aarch64, x86_64), and Windows (x86_64).
- Medium install friction due to compiled wheels; however, prebuilt binaries are available for common platforms (macOS, Linux, Windows) across Python 3.10–3.12, and the package is actively maintained with a recent release.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use regopy in commercial and proprietary projects with minimal restrictions.
last release 2026-07-06 (39 days) · last repo commit 2026-08-14 · 47 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 185,354 downloads/mo, #10,011 on PyPI
Alternatives
Verify before relying
from regopy import Interpreter
rego = Interpreter()
result = rego.query("x=5;y=x + (2 - 4 * 0.25) * -3 + 7.4;2 * 5")
print(result)- Whether the C++ runtime dependency (rego-cpp) is bundled in wheels or requires separate installation.
- Performance characteristics when executing complex policies or large datasets.
- Exact scope of custom built-in function support beyond the documented standard Rego built-ins.
What it is and what it does
regopy is a Python wrapper around rego-cpp, Microsoft's open-source C++ implementation of the Rego language from the Open Policy Agent project. Rego is a declarative query language designed for policy evaluation and data querying. The package lets you instantiate a Rego interpreter in Python, load policy modules, set input and data contexts, and execute queries that return structured results with variable bindings.
You can use regopy to embed policy-as-code evaluation into Python applications—defining rules in Rego syntax, then querying them from Python with dynamic input and data. The wrapper provides idiomatic Python interfaces: you load modules as strings, set input and data via dictionaries, and receive results as JSON-like objects. It also supports building and executing pre-compiled Rego bundles, useful for performance-sensitive deployments.
Use it for
- Embed policy evaluation in Python microservices to enforce authorization rules or compliance checks without external API calls.
- Build configuration validation tools that use declarative Rego rules to check infrastructure or application settings.
- Implement access control logic in Python applications by writing Rego policies and querying them with user/resource context.
- Integrate OPA-compatible policies into Python data pipelines for dynamic filtering or transformation rules.
- Prototype and test Rego policies in a Python environment before deploying them to a full OPA instance.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to run Rego policies from Python.
The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and provides prebuilt wheels for common platforms. Medium install friction is typical for compiled packages and not a barrier. Start with it if you're already using or planning to adopt Rego for policy evaluation.
Install
regopy on PyPI
Before you install
Medium install friction due to compiled wheels; however, prebuilt binaries are available for common platforms (macOS, Linux, Windows) across Python 3.10–3.12, and the package is actively maintained with a recent release.
Requires Python 3.10 or later; prebuilt wheels are available for macOS (arm64, x86_64), Linux (aarch64, x86_64), and Windows (x86_64).
License in practice
MIT license is permissive; you can use regopy in commercial and proprietary projects with minimal restrictions.
Quickstart
from regopy import Interpreter
rego = Interpreter()
result = rego.query("x=5;y=x + (2 - 4 * 0.25) * -3 + 7.4;2 * 5")
print(result)
Verify before relying
- Whether the C++ runtime dependency (rego-cpp) is bundled in wheels or requires separate installation.
- Performance characteristics when executing complex policies or large datasets.
- Exact scope of custom built-in function support beyond the documented standard Rego built-ins.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4,>=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 39 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 185,354 / month, #10,011 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3 |
Evidence: regopy-1.5.2-cp310-cp310-macosx_15_0_arm64.whl; regopy-1.5.2-cp310-cp310-macosx_15_0_x86_64.whl; regopy-1.5.2-cp310-cp310-manylinux_2_34_aarch64.whl; regopy-1.5.2-cp310-cp310-manylinux_2_34_x86_64.whl; regopy-1.5.2-cp310-cp310-musllinux_1_2_aarch64.whl; regopy-1.5.2-cp310-cp310-musllinux_1_2_x86_64.whl; regopy-1.5.2-cp310-cp310-win_amd64.whl; regopy-1.5.2-cp311-cp311-macosx_15_0_arm64.whl; regopy-1.5.2-cp311-cp311-macosx_15_0_x86_64.whl; regopy-1.5.2-cp311-cp311-manylinux_2_34_aarch64.whl; regopy-1.5.2-cp311-cp311-manylinux_2_34_x86_64.whl; regopy-1.5.2-cp311-cp311-musllinux_1_2_aarch64.whl; regopy-1.5.2-cp311-cp311-musllinux_1_2_x86_64.whl; regopy-1.5.2-cp311-cp311-win_amd64.whl; regopy-1.5.2-cp312-cp312-macosx_15_0_arm64.whl; regopy-1.5.2-cp312-cp312-macosx_15_0_x86_64.whl; regopy-1.5.2-cp312-cp312-manylinux_2_34_aarch64.whl; regopy-1.5.2-cp312-cp312-manylinux_2_34_x86_64.whl; regopy-1.5.2-cp312-cp312-musllinux_1_2_aarch64.whl; regopy-1.5.2-cp312-cp312-musllinux_1_2_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “rego policy language python”
- regopyregopy wraps the Open Policy Agent's Rego language compiler and…
- cel-pythonParses and evaluates Google Common Expression Language (CEL)…
- cel-expr-pythonA Python wrapper for the CEL C++ implementation that compiles and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also agent-framework-declarative · opik · pulumi-policy · toolguard · oslo.policy · open-interpreter · agent-framework-purview · agentops · mo-parsing · policyuniverse