{"name":"vcrpy: Simplify and Speed Up Python HTTP Testing","description":"vcrpy is a Python library that automatically mocks your HTTP interactions, making testing simpler and significantly faster. Inspired by Ruby's VCR, it records HTTP requests and responses to a 'cassette' file during the first test run, then replays them in subsequent runs, eliminating actual network traffic. This approach ensures deterministic tests, allows offline development, and boosts test execution speed.","github":"https://github.com/kevin1024/vcrpy","url":"https://osrepos.com/repo/kevin1024-vcrpy","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/kevin1024-vcrpy","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/kevin1024-vcrpy.md","json":"https://osrepos.com/repo/kevin1024-vcrpy.json","topics":["http","mocking","python","testing","testing-tools"],"keywords":["http","mocking","python","testing","testing-tools"],"stars":null,"summary":"vcrpy is a Python library that automatically mocks your HTTP interactions, making testing simpler and significantly faster. Inspired by Ruby's VCR, it records HTTP requests and responses to a 'cassette' file during the first test run, then replays them in subsequent runs, eliminating actual network traffic. This approach ensures deterministic tests, allows offline development, and boosts test execution speed.","content":"## Introduction\nvcrpy is a powerful Python library designed to simplify and accelerate the testing of applications that make HTTP requests. It acts as a 'cassette recorder' for your network interactions, inspired by the popular Ruby VCR library. By recording and replaying HTTP traffic, vcrpy helps developers create robust and efficient test suites.\n\n## Installation\nInstalling vcrpy is straightforward using pip:\n\nbash\npip install vcrpy\n\n\n## Examples\nThe core concept of vcrpy involves wrapping your code that makes HTTP requests within a context manager or decorating a function. The first time this code runs, vcrpy records all HTTP interactions to a YAML file, known as a 'cassette'. On subsequent runs, vcrpy intercepts these requests and serves the recorded responses from the cassette, bypassing actual network calls.\n\n## Why use vcrpy?\nUsing vcrpy offers several significant advantages for testing:\n\n- **Work Offline**: Develop and run tests without an active internet connection.\n- **Deterministic Tests**: Ensure your tests always produce the same results, free from external API flakiness or changes.\n- **Increased Test Speed**: Eliminate slow network requests, drastically speeding up your test suite execution.\n\nIf an external API changes, simply delete the old cassette files, and vcrpy will record new interactions on the next test run.\n\n## Links\nFind more information and contribute to vcrpy through these official links:\n\n- [GitHub Repository](https://github.com/kevin1024/vcrpy){:target=\"_blank\"}\n- [Official Documentation](https://vcrpy.readthedocs.io/){:target=\"_blank\"}\n- [PyPI Package](https://pypi.python.org/pypi/vcrpy){:target=\"_blank\"}","metrics":{"detailViews":1,"githubClicks":0},"dates":{"published":null,"modified":"2026-08-03T08:19:44.000Z"}}