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

Uploaded CPython 3.12macOS 11.0+ ARM64

assay_it-3.4.0-cp312-cp312-macosx_10_12_x86_64.whl (904.5 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

assay_it-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (492.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for assay_it-3.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6e562422f6c8927acef09604a379e627ac4fbd13250f8033cd4f45400adea670
MD5 6d709b9f1ceba185472c3e14a94f8683
BLAKE2b-256 51507d4f26a1a160a695883852d8ec8f5a31e9fa8c7173d30911d78f33a9d05a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-3.4.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 98306ff8c09908cf9ea83258f6a57becca5740c056697cd39992dcd94ac59d18
MD5 75250e689148d0288c2c873a59a3bb14
BLAKE2b-256 23fb7a875b0dbaad533ef5d2709b4514a225b05bc47bdac44009e9a194e07d95

See more details on using hashes here.

Provenance

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

File details

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

File metadata

File hashes

Hashes for assay_it-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3ca8a491d461cb834adbfdd24ff3c95867c6eb080b63dfe8d1337ff2871da460
MD5 d0cbdfe0471ff1004839fdaad81f9642
BLAKE2b-256 7c0821db8865e6298ff364e04673850590e3557a775aec7c0017e3d436ed0d6c

See more details on using hashes here.

Provenance

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