Skip to main content

tinyeval

Test your Python app's AI calls from the command line: write test cases in a short bash file, and tinyeval runs them against your real code and says which replies pass.

Install

pip install tinyeval-cli

With uv, as a dev dependency:

uv add --dev tinyeval-cli

Example

evals/support.sh lists the test cases. Its worker line starts your app once, not once per test case:

worker python -m evals.worker

test_case "refund after the window" "Can I still return my shoes? They arrived 40 days ago."
  matches "30[- ]day"
  judge "Says a refund isn't possible anymore, politely"

evals/worker.py hands each input to your code. Import tinyeval before your app, so the app's prints go to stderr and only replies reach tinyeval:

import os

from tinyeval import CouldntRun, worker

from app.support import answer


def reply(message):
    if not os.environ.get("ANTHROPIC_API_KEY"):
        raise CouldntRun("ANTHROPIC_API_KEY isn't set")
    return answer(message)


worker(reply)

reply can also be an async def.

Run it

tinyeval

With uv: uv run tinyeval. Add -n 3 to run each test case three times.

Errors

  • CouldntRun("reason") marks the test case as couldn't run. tinyeval counts it apart from failures, and still exits 1.
  • Errors from the anthropic and openai SDKs count as couldn't run too, when the cause isn't your code: status 401, 429 or 500 and up, connection errors and timeouts.
  • Any other exception becomes the reply, such as ValueError: no order id, so the eval fails. Its traceback goes to stderr.

Needs bash

bash 3.2 or later: macOS and Linux have it, and on Windows it comes with Git for Windows.

Updating

pip install -U tinyeval-cli

With uv: uv lock --upgrade-package tinyeval-cli. tinyeval is a normal dependency in your lock file, so Dependabot and Renovate open pull requests for new versions.

Metadata

Release files for tinyeval-cli 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tinyeval-cli 0.12.0
File Interpreter ABI Platform Actions
tinyeval_cli-0.12.0-py3-none-any.whl Python 3 none any Details for tinyeval_cli-0.12.0-py3-none-any.whl

Release files / tinyeval_cli-0.12.0-py3-none-any.whl

Download URL tinyeval_cli-0.12.0-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f11a9d9f571aee3e9748dad979fed951f4470db17ae84fdcdc2d434c47be496d
BLAKE2b-256 checksum
How to use checksums
409248be97ea199cd1c4ea1e12ce5ab901c96a7e50a0a3980fa4831b4998a16e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for tinyeval-cli 0.12.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for tinyeval_cli-0.12.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page