Skip to main content

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:mm offset), 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.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for armoriq-policy-ir 0.1.3
File Size Uploaded Provenance Actions
armoriq_policy_ir-0.1.3.tar.gz 11.1 kB Without provenance Details for armoriq_policy_ir-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for armoriq-policy-ir 0.1.3
File Interpreter ABI Platform Actions
armoriq_policy_ir-0.1.3-py3-none-any.whl Python 3 none any Details for armoriq_policy_ir-0.1.3-py3-none-any.whl

Total release size: 21.1 kB

Release files / armoriq_policy_ir-0.1.3.tar.gz

Download URL armoriq_policy_ir-0.1.3.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b98396c5607584135453e9bc32781c9462afb44279f6346b808885c67790f166
BLAKE2b-256 checksum
How to use checksums
27a7288135e48342e0d729b551066b7e19cd6dbf1e6576ae429640d67a81c7db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / armoriq_policy_ir-0.1.3-py3-none-any.whl

Download URL armoriq_policy_ir-0.1.3-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1bbb81a62c751ab0d94fa1ac097b63abbe4d139c170d469ae53f8b3980fa6df
BLAKE2b-256 checksum
How to use checksums
dbc53c707bf95f44bea26a4030dff6ed99f783ebd64bb0a26ec1eaee6d66189d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for armoriq-policy-ir 0.1.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.

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.

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