HTTPretty vs vcrpy

Python HTTP testing tools compared

HTTPretty and vcrpy help Python developers test code that makes HTTP requests without relying on live services for every test. HTTPretty registers fake responses directly, while vcrpy records real interactions to cassette files and replays them later.

HTTPrettyvcrpy
LanguagePythonPython
LicenseMITMIT
Stars2.1k3k
Forks285444
Last analyzedOct 3, 2026Oct 3, 2026

Key differences

  • HTTPretty intercepts traffic at the socket level and returns responses registered for HTTP methods and URLs; vcrpy records and replays matching interactions from cassette files.
  • HTTPretty can capture requests for assertions and register successive responses for repeated requests; vcrpy can refresh recorded interactions by removing cassette files and recording again.
  • HTTPretty can disable network connections during a test; vcrpy needs a reachable service for the initial recording run, then can replay interactions offline.
  • HTTPretty lists Python 3.6 through 3.9 as supported; vcrpy advises checking its documentation for supported libraries and configuration.
  • Both projects use Python and the MIT license. HTTPretty has 2.1k stars and 285 forks, while vcrpy has 3k stars and 444 forks.

Choose HTTPretty if you…

  • need to register predictable responses for specific methods and URLs.
  • want to inspect captured request bodies or counts in tests.
  • need to test successive responses without recording a live interaction first.
Read the HTTPretty analysis →

Choose vcrpy if you…

  • want to save HTTP interactions to cassette files and replay them in later test runs.
  • need tests to run offline after recording the required interactions.
  • want to refresh recorded fixtures by removing cassettes and running tests again.
Read the vcrpy analysis →

Compare the numbers side by side, or add more projects

This comparison is generated with AI from the OSRepos analyses of both projects. Always check each project's repository and documentation before choosing.