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.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (493.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

assay_it-3.18.0-cp312-cp312-macosx_11_0_arm64.whl (763.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

assay_it-3.18.0-cp312-cp312-macosx_10_12_x86_64.whl (897.7 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for assay_it-3.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e6b97948e11715ecad4d40f2f244bea958ac75fe4c47b463395ab44f6a3469c
MD5 bc720afa04a31b8d9c51cb56b8cf57ad
BLAKE2b-256 e8b44ac7af9feedc136910b9434c3187ed8c667cb93d3ec1d3eb0a1bb2d93d80

See more details on using hashes here.

Provenance

The following attestation bundles were made for assay_it-3.18.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.18.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for assay_it-3.18.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 110b061ff4a94322b512b5ca1637570e9f852ab3db353eff6783691f18f6bb09
MD5 d2493f0a2ee22361f2ad21be43641d52
BLAKE2b-256 3733ff766f113f1c6d72ab273e580d99293698c1c2d985fb50bd72b300d29070

See more details on using hashes here.

Provenance

The following attestation bundles were made for assay_it-3.18.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.18.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for assay_it-3.18.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0ebd06b97b37dfea1d65f0aa86cf314ad37f6f5f52db8047e70adb158d1da995
MD5 7f610fc79909ebac90323b32032587ec
BLAKE2b-256 266d069860fe8a6f57434d42c2fa846cde3367918ece978b66ae0b7ca2cbdbf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for assay_it-3.18.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