logicpearl
Official Python bindings for logicpearl-engine.
Use this package when:
- Python code needs to execute a pearl artifact or pipeline directly
- you want a real bridge to the Rust execution surface
- you do not want to shell out to the CLI for every request
Do not use it as a reason to bake observers into pearls. The intended split is still:
- observer/plugin: messy input interpretation
- pearl: deterministic policy artifact
- verify/response: operational interpretation
Example
from logicpearl import LogicPearlEngine
engine = LogicPearlEngine.from_artifact_path("/path/to/logicpearl-bundle")
result = engine.evaluate({
"age": 34,
"member": True,
"country": "US",
})
print(result["decision_kind"])
print(result["allow"])
For pipeline execution, use LogicPearlEngine.from_pipeline_path("/path/to/pipeline.json").
The installed Python package does not bundle the repository examples under examples/.
Scope
This package exposes local execution through logicpearl-engine.
It is:
- a local evaluation library, not a service client
- not a reimplementation of runtime semantics in Python
- not a wrapper around
logicpearlCLI subprocess calls
API Shape
LogicPearlEngine.from_path(path) loads an artifact or pipeline once. Reuse the
engine object for request-time evaluation.
evaluate(input)returns the runtime result payload directly. For gate and action artifacts, this matcheslogicpearl run --json.evaluate_batch(inputs)returns a list of runtime result payloads.run(input)returns the full engine envelope with the artifact kind included.run_single(input)andrun_batch(inputs)expose the same envelope shape for callers that need dispatch metadata.
Inputs must be JSON-compatible Python values: dict, list, tuple, str, int, float, bool, or None. Evaluation runs in Rust without spawning the CLI.
Metadata
Release files for logicpearl 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| logicpearl-0.1.5.tar.gz | 66.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| logicpearl-0.1.5-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 1.1 MB
Release files / logicpearl-0.1.5.tar.gz
| Download URL | logicpearl-0.1.5.tar.gz |
|---|---|
| Size | 66.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d54fe0baa36191769d3eee4d3cc449dfcdac379c9c01d4cd8130b959e396b6a3
|
|
BLAKE2b-256 checksum How to use checksums |
41010fa1943661c959ea4e7a19b94aff22e499dc65095c7dfbaa5a493d435452
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / logicpearl-0.1.5-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | logicpearl-0.1.5-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7a1889ce132260e4846ab837bb970285cec9de308dcf2a47753c906b17df2556
|
|
BLAKE2b-256 checksum How to use checksums |
b50632955758c3665bcb752e40c1e4cfe7907fb4877b187dbfbc1d271148cca9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for logicpearl 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.