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

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

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.36.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

assay_it-3.36.0-cp312-cp312-macosx_11_0_arm64.whl (808.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

assay_it-3.36.0-cp312-cp312-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for assay_it-3.36.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b48a83b471c3231499056c3dee8697764ca9bb26df305e530802528aa5caaf3f
MD5 0a526a5a3c6206112e48e6b00a70fb39
BLAKE2b-256 5539754461ec2d8ed7754c7a4b7a0c2e58d18520cfb9a9f02ef3c0a617da9360

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-3.36.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fe656af3808bbacd80f66691d930224e31771c2afa4bc616e054d772d0596783
MD5 6e1e7d2b875dc40a39f90bce5ffba8a9
BLAKE2b-256 78eb59ca27ee692fd3e06493f1219196a3ed4011f567ccc231716db4c0cc4c1d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-3.36.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b06bcb975dc28e05ee012c4de15f2d9bc6cb47cef8358aab0f643eddb47b35b1
MD5 3ea4c0bf1349ee33ec2c57cca81352da
BLAKE2b-256 c709db9821ac007fe0f1a80eec740db06706d5dd272432c26d1d6fcb7df4004b

See more details on using hashes here.

Provenance

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

Release history Release notifications | RSS feed

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