armoriq-policy-ir (Python)
The Armor Policy v2 evaluator for Python runtimes. CI runs it on every vector in vectors/evaluate.json, the same file the TypeScript evaluate() in @armoriq/policy-ir must pass.
from armoriq_policy_ir import evaluate
evaluation = evaluate(
{"tool": "create_payment", "arguments": {"amount": 900}, "timestamp": "2026-10-16T12:00:00.000Z"},
{"agent": document},
)
evaluation["verdict"] # "allow" | "hold" | "block"
Inputs and outputs are the same JSON shapes as the TypeScript package, with camelCase keys.
It follows JavaScript semantics where Python's defaults differ: numbers compare as IEEE doubles, strings are compared and matched as UTF-16 units, dotpaths read own keys only, and regex conditions are translated to JavaScript RegExp behaviour.
evaluate raises instead of guessing when an input is outside what both runtimes read alike:
NotPortable: a regex outside the portable subset. The TypeScript validator rejects these patterns when a policy compiles.UnsupportedTime: a timestamp or expiry that isn't strict ISO-8601 (YYYY-MM-DDTHH:mm:ss.sssZ, with optional parts and a±HH:mmoffset), or a local time outside years 1 to 9999.
A caller must treat any exception from evaluate as a block.
Metadata
Release files for armoriq-policy-ir 0.1.6
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 | Actions |
|---|---|---|---|---|
| armoriq_policy_ir-0.1.6.tar.gz | 11.3 kB | Without provenance | Details for armoriq_policy_ir-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| armoriq_policy_ir-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for armoriq_policy_ir-0.1.6-py3-none-any.whl |
Total release size: 21.5 kB
Release files / armoriq_policy_ir-0.1.6.tar.gz
| Download URL | armoriq_policy_ir-0.1.6.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae880f24d2837d76e459c83f9123345e0245eec90f535673ad634d04c8576a2b
|
|
BLAKE2b-256 checksum How to use checksums |
e2046c43c19214fa439e46669ccb7cd31672d5fe5ede4e3e6d72fd2136d13ac6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / armoriq_policy_ir-0.1.6-py3-none-any.whl
| Download URL | armoriq_policy_ir-0.1.6-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
342671899dcf6e7c8c85f04c9c4dd208ece784dd8de7cf403367e44fdd25b934
|
|
BLAKE2b-256 checksum How to use checksums |
f7c944391f60b8dff8dc7e17724819ab29098a3ec429ad4eae2abb86c5a1ee9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for armoriq-policy-ir 0.1.6
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.