Skip to main content

Python bindings for Assay trace capture, policy coverage, and explanation helpers.

Project description

Assay Python Bindings

assay-it is the Python package for the assay import namespace.

It currently provides a small, bounded surface on top of Assay core:

  • AssayClient for writing JSONL trace records from Python
  • Coverage for policy coverage analysis against trace/tool-call inputs
  • Explainer for rule-by-rule explanation of a single trace
  • a pytest fixture plugin exposed as assay_client

Install

pip install assay-it

Import path:

from assay import AssayClient, Coverage, Explainer, validate

What It Is

This package is for Python-side trace capture and lightweight policy-analysis helpers. It is useful when you want to:

  • append structured trace events to a JSONL file from Python
  • analyze tool-call traces against an Assay policy
  • explain why a given trace matched or violated policy rules
  • use a simple pytest fixture around the Python client

What It Is Not

This package is not the full Assay CLI or the full trust-compiler surface. It does not replace:

  • assay mcp wrap and runtime MCP enforcement
  • evidence bundle generation and verification workflows
  • Trust Basis / Trust Card generation
  • the GitHub Action or release-binary install path

Those outward-facing product surfaces live in the main Assay CLI and repository docs.

Example

from assay import AssayClient, Coverage, Explainer

client = AssayClient("traces.jsonl")
client.record_trace({"tool": "ToolA", "args": {"q": "weather"}})

coverage = Coverage("assay.yaml")
report = coverage.analyze([[{"tool": "ToolA", "args": {"q": "weather"}}]])

explainer = Explainer("assay.yaml")
details = explainer.explain([{"tool": "ToolA", "args": {"q": "weather"}}])

Repository

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

assay_it-3.25.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (494.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

assay_it-3.25.0-cp312-cp312-macosx_11_0_arm64.whl (764.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

assay_it-3.25.0-cp312-cp312-macosx_10_12_x86_64.whl (899.0 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

Details for the file assay_it-3.25.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for assay_it-3.25.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8aef747c4aaa4842f65274fd3f32b83659982a6ed26cc2c28cbfc7d26196f23a
MD5 98dd428f855ddfafa7c579028f9d415e
BLAKE2b-256 3f3eb808260312e3bc2854e71678b0c0ee78632b6f2188934578b7a3fc000fa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for assay_it-3.25.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on Rul1an/assay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file assay_it-3.25.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for assay_it-3.25.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5ae8ec277f63dd28dde92df59dd995e1a383b1b0bd73296952e770798f46f105
MD5 d909361e568821f9c0cb8f1f421607e3
BLAKE2b-256 dbe47153374fa98a5dae28123b68e413ab4b5dd8ae77068e1e94496458fb21b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for assay_it-3.25.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on Rul1an/assay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file assay_it-3.25.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for assay_it-3.25.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 149a8cd5bb9791638d0cd3ffdbb5e5c049405b158aa94c86c1357b4d48680080
MD5 eb3e4735f5030bf27faef7d80d26550a
BLAKE2b-256 de5da7e3a24d8bb256b2133e11f0d3ab676346bb2d04e2ef48c7a5cd2b90947e

See more details on using hashes here.

Provenance

The following attestation bundles were made for assay_it-3.25.0-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: release.yml on Rul1an/assay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page