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

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

assay_it-3.28.0-cp312-cp312-macosx_11_0_arm64.whl (763.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

assay_it-3.28.0-cp312-cp312-macosx_10_12_x86_64.whl (898.5 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for assay_it-3.28.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c03b729be9b258e3aa74aadacce7be398184980c36d82cfcb3a05d733c4e378f
MD5 e393d11a1a5d25ea34c5dc97f079fdbb
BLAKE2b-256 655c73c92a080a18a09d8dd2543c5cddd117c8d0e3088a00688ab527a4e4a115

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-3.28.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6f6980e1659054b732dcdc393909ee5af3bba5880837ab26e7963e2d1ac938c6
MD5 046ca2720a56b88dd181055af7b49fc6
BLAKE2b-256 76af6f9206d8e417b51520f5753c0edc18699fb262521f32970fccd058df19cd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-3.28.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ae34eaf2285c7ea7b332fcc3fbf6d7827a7b2a36e76febc8ff6203b8c891ba9f
MD5 9ec58658eb9859feb455fe22bc35340a
BLAKE2b-256 fbba8b62e143d265797ce319da4b7d1acffb3e48d22a49e429161c17502c6a1e

See more details on using hashes here.

Provenance

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