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.1.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.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: skilltest_sdk-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 daf55db74cf00cb17cfd418f0eee10d56a2ddafedbde2fc70670178810f89b87
MD5 df48428cc6b5e8ab8f27b8afa812aada
BLAKE2b-256 c0dd2127ef20aaea38419cb2461879e9d30e174f41e82f551049597c7f93d892

See more details on using hashes here.

File details

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

File metadata

  • Download URL: skilltest_sdk-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e689c359ffc1804c995e9799b0205795a45d068626da09bfc522ceafe9a1970a
MD5 0fb250c269e74581a19638464fc6c79f
BLAKE2b-256 ac4f477df302acab8a24526e7d330dab5a927f5bd7bb0bac199c3ab0b325e0b1

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