# Record and replay HTTP fixtures for deterministic Python tests with VCR.py

> Use VCR.py when an agent needs to turn flaky, slow, or rate-limited Python tests into stable runs by recording real HTTP interactions once and replaying them from cassette files. The agent decides which requests belong in fixtures, refreshes stale cassettes when upstream APIs change, and keeps external traffic out of the repeat test loop.

- Skill: `agentskillexchange/record-and-replay-http-fixtures-for-deterministic-python-tes` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/record-and-replay-http-fixtures-for-deterministic-python-tes`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/record-and-replay-http-fixtures-for-deterministic-python-tes/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/record-and-replay-http-fixtures-for-deterministic-python-tes

---


# Record and replay HTTP fixtures for deterministic Python tests with VCR.py

Use VCR.py when an agent needs to turn flaky, slow, or rate-limited Python tests into stable runs by recording real HTTP interactions once and replaying them from cassette files. The agent decides which requests belong in fixtures, refreshes stale cassettes when upstream APIs change, and keeps external traffic out of the repeat test loop.

## Prerequisites

Python plus VCR.py integrated into the project's test framework

## Installation

Requirements and caveats from upstream:
- |PyPI| |Python versions| |Build Status| |CodeCov| |Gitter|
- This is a Python version of Ruby's VCR
- :target: https://pypi.python.org/pypi/vcrpy

Basic usage or getting-started notes:
- first time you run code that is inside a VCR.py context manager or
- recognizes from the original test run and return the responses that
- to do is delete your existing cassette files, and run your tests again.

- Source: https://github.com/kevin1024/vcrpy
- Extracted from upstream docs: https://raw.githubusercontent.com/kevin1024/vcrpy/HEAD/README.rst

## Documentation

- https://vcrpy.readthedocs.io/

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/record-and-replay-http-fixtures-for-deterministic-python-tests-with-vcr-py/)

