Skip to main content

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

CPython 3.12, 3.13, and 3.14 on macOS x86_64/arm64 and Linux x86_64; other interpreters and platforms are not claimed.

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

Metadata

Release files for assay-it 6.22.2

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

Built distributions (wheels)

Table of built distributions (wheels) for assay-it 6.22.2
File Interpreter ABI Platform Actions
assay_it-6.22.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for assay_it-6.22.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
assay_it-6.22.2-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for assay_it-6.22.2-cp312-abi3-macosx_11_0_arm64.whl
assay_it-6.22.2-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for assay_it-6.22.2-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 5.1 MB

Release files / assay_it-6.22.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL assay_it-6.22.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.8 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
f507f6afdafb30824b1d9c595d3797d69a2c124e6962e6fc6cf04d3e0fbd3a90
BLAKE2b-256 checksum
How to use checksums
7dacc83a599ab86a1fa2a6bf2e824f346330e2e5c93e69346c382b9ceb425c0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / assay_it-6.22.2-cp312-abi3-macosx_11_0_arm64.whl

Download URL assay_it-6.22.2-cp312-abi3-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
556f7005ea09df0f6b8eea354dcebaeb3693d8abf6cd428c20a64f5fb734f2cc
BLAKE2b-256 checksum
How to use checksums
20e4c78215772557bebd0bf105dba429c3334be81deb45540349a1ef7149d54c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / assay_it-6.22.2-cp312-abi3-macosx_10_12_x86_64.whl

Download URL assay_it-6.22.2-cp312-abi3-macosx_10_12_x86_64.whl
Size 2.1 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8ea760a2fbdfa45d37bb938f4cf7f6c6638992363b44ccd9f8492f1507228dbe
BLAKE2b-256 checksum
How to use checksums
cdee7eed431f35d3d96c4cf4db9308397c206666b7382b20d4fd08c1849ed0d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for assay-it 6.22.2

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.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for assay_it-6.22.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

6.22.2 This release

3 release files Full provenance

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