skillfed

vcrpy

Automatically mock your HTTP interactions to simplify and speed up testing

vcrpy Permissive license MIT Active 2,982 v8.3.0 released

Install

vcrpy on PyPI

pip

pip install vcrpy

uv

uv add vcrpy

poetry

poetry add vcrpy

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — PyYAML, wrapt
Maintenance actively maintained — 40 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: vcrpy-8.3.0-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Testing

About vcrpy

from the package's own PyPI description — quoted content, verbatim

VCR.py 📼

|PyPI| |Python versions| |Build Status| |CodeCov| |Gitter|


.. image:: https://vcrpy.readthedocs.io/en/latest/_images/vcr.svg :alt: vcr.py logo

This is a Python version of Ruby's VCR library <https://github.com/vcr/vcr>__.

Source code https://github.com/kevin1024/vcrpy

Documentation https://vcrpy.readthedocs.io/

Rationale

VCR.py simplifies and speeds up tests that make HTTP requests. The first time you run code that is inside a VCR.py context manager or decorated function, VCR.py records all HTTP interactions that take place through the libraries it supports and serializes and writes them to a flat file (in yaml format by default). This flat file is called a cassette. When the relevant piece of code is executed again, VCR.py will read the serialized requests and responses from the aforementioned cassette file, and intercept any HTTP requests that it recognizes from the original test run and return the responses that corresponded to those requests. This means that the requests will not actually result in HTTP traffic, which confers several benefits including:

  • The ability to work offline
  • Completely...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

VCR.py records and replays HTTP interactions for tests, allowing you to run deterministic offline tests by capturing real HTTP exchanges into YAML cassette files and replaying them on subsequent runs.

Low friction: pure Python wheel with only two lightweight runtime dependencies (PyYAML and wrapt). Active maintenance with a release 40 days ago and recent commits; 2982 GitHub stars indicate solid community adoption.

MIT license (permissive) means you can use, modify, and distribute vcrpy freely in commercial and private projects with minimal restrictions—only attribution is required.

Usage

pip install vcrpy

import vcrpy

# Use vcrpy context manager or decorator to record/replay HTTP interactions

Requires Python 3.10 or later.

Verdict: vcrpy is a mature, actively maintained testing utility (Production/Stable, top 1000 PyPI) with permissive MIT licensing, minimal dependencies, and zero known vulnerabilities. It is a low-friction choice for teams needing deterministic HTTP testing.

Needs verification

  • Which HTTP libraries vcrpy intercepts and whether it covers all libraries your test suite uses.
  • Performance overhead of cassette serialization/deserialization for large test suites with many HTTP interactions.
  • Specific usage patterns and configuration options beyond basic context manager/decorator usage.
http mocking for testsrecord replay http interactionsvcr cassette testingdeterministic http testingoffline test fixturesmock http requeststest http interactions

Similar packages