Skip to main content

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

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-5.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

assay_it-5.0.0-cp312-cp312-macosx_11_0_arm64.whl (818.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

assay_it-5.0.0-cp312-cp312-macosx_10_12_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for assay_it-5.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c036686d55c358e7c0f341449acc27d283087e97e6055994bf9aee26cbb61739
MD5 cf916e820f60bc296293bc381198aecf
BLAKE2b-256 b46937ee5b85031bdc7fc112860c45e71e4d0d239657b4f8da4f3b674cbd584a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-5.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c4b1bbbc8e07b77f7dd81db2babff4bcd580563954de8416cd002b1399b0bed
MD5 9f3404a93366d36a10931dcfa8c56e8f
BLAKE2b-256 502a027207764ccbedbfdab55cef7a2e1eb2ce746a1e49abcc706df37c613575

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for assay_it-5.0.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 13ca370dd101c8ec9eb0f986792b6f749136f7c5ae8decfef99d5ae5e227763f
MD5 1d9df2ed3b19c87146d189a53fc0e14f
BLAKE2b-256 836d4a08816c4965922b959b9d58b97b7b405810234f9591b4a0f04901ac3420

See more details on using hashes here.

Provenance

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

Release history Release notifications | RSS feed

This release

5.0.0

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