Skip to main content

Python SDK for the skilltest CLI: run AI-skill tests and natural-language evals from Python, with a typed report contract.

Project description

skilltest-sdk

The Python SDK for the skilltest CLI. A thin, typed wrapper and nothing else: it runs the CLI as a subprocess and parses the stable --format json contract into Pydantic models. Test-framework integrations build on it — use skilltest-pytest if you want pytest collection; use this package directly from any other Python code.

from skilltest_sdk import run_skill, validate_skill

report = run_skill("cases/greet.yaml")
assert report.passed, report.describe_failures()
# Mix in deterministic checks on the transcript:
assert "Dr. Smith" in report.runs[0].transcript.assistant_text()

result = validate_skill("skills/greeter")
assert result.valid

The skilltest binary is resolved from the bin= argument, the SKILLTEST_BIN env var, or PATH; a provider override comes from provider= or SKILLTEST_PROVIDER. A failing eval is reported (report.passed is false), not raised; bad input raises SkilltestUsageError (CLI exit 2) and provider problems raise SkilltestProviderError (exit 3).

The Pydantic models are generated from schemas/report.schema.json / schemas/validation.schema.json — themselves generated from the CLI's own types — via just gen-contract, and a drift gate in CI fails if anything is stale, so the models cannot diverge from the binary.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skilltest_sdk-0.1.0.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skilltest_sdk-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file skilltest_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: skilltest_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for skilltest_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 efc1c652039255c58f498d3c49684e79e5055fd0771a8510b9c51330cf27ffce
MD5 98a63bd7dedc776f5e4c775e15019f09
BLAKE2b-256 0a3c80b5d7d33c22c56939716db5388cf23db6d0a757f53b95adad1711488345

See more details on using hashes here.

File details

Details for the file skilltest_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: skilltest_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for skilltest_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2879ed3aa62c36ce08c5eabe25047cf38635753405f6a80305c6803b15214e63
MD5 db9203122fd88dc7e9172b6032a7e4f3
BLAKE2b-256 18ee58b28282fbce7d395d5b2e1d0ff22c98d08bc20d4fa58c67ffcb72c2158b

See more details on using hashes here.

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