python/evalvcr implements the exact evalvcr.cassette.v1 and evalvcr.report.v1 JSON schemas using Python >= 3.10 standard library only (pytest is optional).
Install
Using with pytest
evalvcr registers a pytest11 entry point exposing:
- CLI options:
--evalvcr-mode(defaultreplay) and--evalvcr-cassette-dir(default.evalvcr/cassettes) - Marker:
@pytest.mark.evalvcr(cassette="my-case")(omitmodeso CLI flags controlautolocally vsstrictin CI) - Fixture:
evalvcr_cassette(yieldsCassetteVCR, saves on teardown inrecord/auto, and runsverify_complete()instrictmode)
Using the Python CLI
Rundefine_eval(...) suites or inspect/scrub/export artifacts directly:
Cross-Language Interoperability
Because Python and TypeScript share UTF-16 code-unit JCS canonical JSON sorting, ASCII scrubbing order, and camelCase JSON fields, cassettes recorded in TypeScript replay strictly in Python and vice versa. Seeexamples/python-pytest/test_support_agent.py for a live cross-language replay test.