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.5

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.5
File Size Uploaded Provenance Actions
armoriq_policy_ir-0.1.5.tar.gz 11.3 kB Without provenance Details for armoriq_policy_ir-0.1.5.tar.gz

Built distribution (wheel)

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

Total release size: 21.5 kB

Release files / armoriq_policy_ir-0.1.5.tar.gz

Download URL armoriq_policy_ir-0.1.5.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3d58288bcfe52a61938a3496c798f84c1096629966678292bffbd854fc7ee80f
BLAKE2b-256 checksum
How to use checksums
b2b579894ca4fd976a06a2110d3e24d68638559aa65e675f1bbe6bf146c645eb
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.5-py3-none-any.whl

Download URL armoriq_policy_ir-0.1.5-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9859379ef980fb42376b2279304a0ce1cbb765e08235a100805e915af5ac5791
BLAKE2b-256 checksum
How to use checksums
eab7b632b0b1d9594b47fe23f6ac203dea486326926768e87877f1a367ed23c4
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.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.

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