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

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

assay_it-3.19.0-cp312-cp312-macosx_11_0_arm64.whl (763.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

assay_it-3.19.0-cp312-cp312-macosx_10_12_x86_64.whl (897.2 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for assay_it-3.19.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c4846a550b22057ab860da31ad2b0893406a2200d0c4702d3a072ca81c74b57
MD5 2d32f536f2a020da542741fd24463ea8
BLAKE2b-256 1fc35797a11588a0eefee259017d12c80e566f7b072611e721691eb3ec8a1430

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-3.19.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bde31b2ed0221361d166d3ad1efe7f3d7768862513d5f822a1acb77c2594aea2
MD5 5b56ee29a732776f439ff934bf8dd9a4
BLAKE2b-256 1d0610f79f8de89c7e3e0f3dcc350e9a7fd7bcfcd7c71e22a89a49f1a5990de2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-3.19.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9239147f8097f63b42f901f6ea9a9d25b16cb4aad87d0cbb22028064f9bf1dd4
MD5 ff824f3a7bc910e26e004fd8aaf0e937
BLAKE2b-256 fb4f2e5788b7e8eb23b30580f4af2b93cf4d34d4a2b88a285fb92fcf703a2d87

See more details on using hashes here.

Provenance

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