watchlight-engine
The in-process authorization engine behind Watchlight Developer Edition.
watchlight-engine lets a Python agent make a real authorization decision —
ALLOW / DENY — for a tool call, in-process, with zero infrastructure: no
database, no network, no sidecar. It ships as a prebuilt, self-contained
compiled wheel.
Most developers want the
watchlightpackage, the Developer Edition with an ergonomic decorator API. Thiswatchlight-enginepackage is the lower-level engine it embeds — install it directly only if you are building on the engine yourself.
Install
pip install watchlight-engine
Prebuilt wheels are provided for Linux (x86_64, aarch64), macOS (Apple Silicon and Intel), and Windows (x64), for CPython 3.9 and newer. No Rust toolchain is required.
Quickstart
import watchlight_engine
engine = watchlight_engine.PolicyEngine()
assert engine.ready()
# Load a policy, then authorize a request — a real decision, in-process.
engine.add_policy(policy_json)
decision = engine.authorize(request_json)
print(decision) # -> Allow / Deny with the governing reason
When a policy is refused
add_policy refuses a policy whose @enforcement_effect annotation the engine
cannot honour: an effect value it does not implement, or an annotation name
that is a near miss for enforcement_effect (such as @enforcement_efect).
It raises watchlight_engine.PolicyAnnotationError, which is a ValueError,
and does not load the policy. The exception has a .code, which is one of
watchlight_engine.POLICY_ANNOTATION_ERROR_CODES
(UNRECOGNISED_ENFORCEMENT_EFFECT or ENFORCEMENT_EFFECT_NAME_NEAR_MISS), and
a .policy_id naming the refused policy. Any other refusal raises a different
exception.
try:
engine.add_policy(policy_json)
except watchlight_engine.PolicyAnnotationError as err:
print(err.code, err.policy_id)
See the Watchlight documentation for policy and request shapes, and the Developer Edition guide for the full workflow.
What you get
- A real, in-process policy decision — the same authorization engine that powers the Watchlight platform, embedded so you can enforce governance without standing up any services.
- Fail-closed by design: ambiguity denies.
- A single prebuilt wheel per platform — install and go.
Developer Edition vs. Enterprise
The Developer Edition is for building and evaluating locally. The full Watchlight platform adds the governed control plane — centralized policy, tamper-evident lineage and audit, runtime enforcement across your fleet, drift and anomaly detection, secrets brokering, and the operator dashboard. See watchlight.ai to learn more.
License
Proprietary — licensed software, not open source. Copyright © Watchlight AI, LLC. All rights reserved.
The Developer Edition license lets you install and use watchlight-engine free
of charge, including in production and commercially. A commercial license is
required only to provide the engine itself to third parties as a hosted, managed,
or embedded authorization service — contact legal@watchlight.ai.
Redistribution, reverse-engineering, and sublicensing are not permitted. See the
bundled LICENSE for the full terms.
Metadata
Release files for watchlight-engine 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| watchlight_engine-0.2.3-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for watchlight_engine-0.2.3-cp39-abi3-win_amd64.whl |
| watchlight_engine-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for watchlight_engine-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| watchlight_engine-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for watchlight_engine-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| watchlight_engine-0.2.3-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for watchlight_engine-0.2.3-cp39-abi3-macosx_11_0_arm64.whl |
| watchlight_engine-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for watchlight_engine-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 14.0 MB
Release files / watchlight_engine-0.2.3-cp39-abi3-win_amd64.whl
| Download URL | watchlight_engine-0.2.3-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
fe1d1bda2c5a09bcfbaba7b947f75d12cdfc4d19653b21d56a295ea8a1c7d516
|
|
BLAKE2b-256 checksum How to use checksums |
72193ccd3035c58be90964404632f6850cf89a35782eaca43571d79e1ac18301
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / watchlight_engine-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | watchlight_engine-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
aeb637c972fffff8cf4cacf2ded0a0369a0d72df6b2eaca436b95f1a27e73ad2
|
|
BLAKE2b-256 checksum How to use checksums |
f4c40248eb817e3e27ee35fd01ac6ba4a51be47aff859ae46a2710b38b29e770
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / watchlight_engine-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | watchlight_engine-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
060bf4a0df6b298d5eaaf18527c9dc39abd201e0c90579204a48e98b78bbba53
|
|
BLAKE2b-256 checksum How to use checksums |
b7890735ccd385148fa4f1e51d15cd5685048d5defe5338e7d9ba75cb59cd571
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / watchlight_engine-0.2.3-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | watchlight_engine-0.2.3-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6fb719faaf830ecf98b6f8a0a1274d27d16d55442a0ec9e6fc897759f0b78190
|
|
BLAKE2b-256 checksum How to use checksums |
cd9929079f5d6fc5220e63bd17b49a5ddc76fd250b9da34b431b017ca77c1267
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logRelease files / watchlight_engine-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | watchlight_engine-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
705a70c52d808d7236c8a517b22938b1bd1431ad5b84dfca400e23f1b964e3d4
|
|
BLAKE2b-256 checksum How to use checksums |
dfb59ccbbb9ea44466a182a135c068e6f4b745b192d5f0d111247486dfc69650
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logSecurity for watchlight-engine 0.2.3
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.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for watchlight_engine-0.2.3-cp39-abi3-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.
Transparency logA 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.