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.5.1-cp312-cp312-macosx_11_0_arm64.whl (766.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

assay_it-3.5.1-cp312-cp312-macosx_10_12_x86_64.whl (905.1 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

assay_it-3.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (494.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file assay_it-3.5.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for assay_it-3.5.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f6ee39bc2602adb52837916ad53342a006cc112caaa763f56a80a50295609dc
MD5 a542b82fe4a12885bb0ee0b58818ab6b
BLAKE2b-256 f3bf15f26a7e98db25085005b58bce126230e5f003661548020fe38b48e749c2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-3.5.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e5913663c3c354b67d8d2fb231d32875ceaebf3ac70a926504e00eac4830b7ba
MD5 f7b1a5b761ce18a01efcded1422e5a6e
BLAKE2b-256 b5d5b7a6e6e34b8cbe809566cabce2574eb08f120300a7dac1584e12814dd50a

See more details on using hashes here.

Provenance

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

File details

Details for the file assay_it-3.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for assay_it-3.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 51d925ba5eeabf61d1811ce2d9a9c719569e74ebfc4e9731734edf7fbcba87f8
MD5 e079a712575645cb81757990541e5857
BLAKE2b-256 f6093aee2954f55a7852205ec8f4b0a3b21695f7e15c4dcf8bb5067664fcc3ca

See more details on using hashes here.

Provenance

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

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