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

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

assay_it-3.9.0-cp312-cp312-macosx_11_0_arm64.whl (768.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

assay_it-3.9.0-cp312-cp312-macosx_10_12_x86_64.whl (905.5 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for assay_it-3.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9c61fa4e23added8a4e7e754c5994479270c731e8d1dfadd649623f573b784a2
MD5 23e76834f85a996a1c8e29fafc69f6e4
BLAKE2b-256 624b249a0d90e71c9787e4630384bcd892b62065fc684cbbd41601a34c5533f7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-3.9.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a274037227c461f552cabffe9f5ff92c85da8f378027410b6cf9eedf51a80939
MD5 4c2cb5557cb61ab8e2d5bd837da758d0
BLAKE2b-256 6e7c73ec917b504cba336fe30142cc3580d5ebc7eb129df58b965661e82967bc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-3.9.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4de721d5af59992ab0f9e628ffcb30249a99059a895c8782fa5a78c583f178a5
MD5 5c69a1d907837e7ec164ab5cddcd5bbb
BLAKE2b-256 e47654a70309105a5a6bf4dcee443c9de37fff1c8853fe30da1826e5e6d24267

See more details on using hashes here.

Provenance

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