Skip to main content

evalvcr (Python Companion)

Local-first AI-agent & MCP evaluation and deterministic VCR cassette testing suite — pure Python (>= 3.10, zero required external runtime dependencies) with an optional pytest11 plugin.

Shares exact byte-level evalvcr.cassette.v1 and evalvcr.report.v1 camelCase + JCS canonical JSON + SHA-256 parity with the TypeScript evalvcr packages so cassettes recorded in TypeScript replay strictly in Python and vice versa.

Installation

pip install evalvcr
# With optional pytest plugin support:
pip install "evalvcr[pytest]"

Quick Start (pytest)

Leave mode unset on the marker so --evalvcr-mode=auto records locally and --evalvcr-mode=strict enforces CI:

import pytest
from evalvcr import CassetteVCR, exact_match


@pytest.mark.evalvcr(cassette="weather-agent")
def test_agent_replay(evalvcr_cassette: CassetteVCR) -> None:
    interaction = evalvcr_cassette.interact(
        kind="llm.chat",
        provider="anthropic",
        request={"method": "POST", "target": "/v1/messages", "body": {"prompt": "hi"}},
        execute=lambda: {"response": {"status": 200, "sdk": {"text": "hello"}}},
    )
    res = exact_match()({"output": interaction["response"]["sdk"]["text"], "expected": "hello"})
    assert res["score"] == 1.0
pytest --evalvcr-mode=auto --evalvcr-cassette-dir=.evalvcr/cassettes
pytest --evalvcr-mode=strict --evalvcr-cassette-dir=.evalvcr/cassettes

CLI

evalvcr --version
python -m evalvcr --help
python -m evalvcr run ./evals --mode strict
python -m evalvcr inspect .evalvcr/cassettes/demo.evalvcr.json
python -m evalvcr scrub .evalvcr/cassettes/demo.evalvcr.json --write

License

MIT — see LICENSE

Metadata

Release files for evalvcr 0.1.2

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

Source distribution (sdist)

Source distribution for evalvcr 0.1.2
File Size Uploaded Provenance Actions
evalvcr-0.1.2.tar.gz 41.4 kB With provenance Details for evalvcr-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for evalvcr 0.1.2
File Interpreter ABI Platform Actions
evalvcr-0.1.2-py3-none-any.whl Python 3 none any Details for evalvcr-0.1.2-py3-none-any.whl

Total release size: 76.1 kB

Release files / evalvcr-0.1.2.tar.gz

Download URL evalvcr-0.1.2.tar.gz
Size 41.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5ef68870b2153ce292ead50be51224c89ff96ae807811f760312508c002baad0
BLAKE2b-256 checksum
How to use checksums
2cf21ae5633535b3f37b884351712be3f7c6bf2fa1ae929a2b625542736f766b
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 Dec 5, 2026.

Transparency log

Release files / evalvcr-0.1.2-py3-none-any.whl

Download URL evalvcr-0.1.2-py3-none-any.whl
Size 34.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5091705b706915dfddc8ecf2ad7fd3c36158c97d598624ba346166f70278e9fa
BLAKE2b-256 checksum
How to use checksums
2b74a82153681881de10493eb4a332d71278d4956c7065f3d16cb3c3f5199b90
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 Dec 5, 2026.

Transparency log

Security for evalvcr 0.1.2

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for evalvcr-0.1.2.tar.gz

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 Dec 5, 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