vcr-stub-server
This is a small tool for setting up a lightweight stub server that replays previously recorded VCR cassettes.
Usually VCR is used internally while running the test suite. In that case, the library is responsible for intercepting HTTP requests.
But in some cases, it can be useful to be able to spin up a live HTTP server which given a preexisting VCR cassette, would respond to each request with its matching recorded response.
One such case might come when implementing usage of Pact, where vcr-stub-server can be used to prevent the provider service from making requests to external services during pact verification. This project was inspired by Pact's own Stub Service.
Caveats
-
Unfortunately, there is no one standard for cassette YAML files, each VCR implementation is different. For example, cassette YAML files created by VCR.py won't be compatible with YAML files created by the Ruby implementation of VCR, etc.
Therfore this tool currently only supports VCR.py, using the library's own implementation of parsing the YAML files.
-
The recorded requests in your YAML cassette file must all be made to the same host.
Installation
$ pip install vcr-stub-server
Usage
Once the package is installed, use the vcr-stub-server command to spin up your stub server.
$ vcr-stub-server path/to/vcr_cassette.yml
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/thatguysimon/vcr-stub-server. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Metadata
Release files for vcr-stub-server 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vcr-stub-server-0.1.4.tar.gz | 5.1 kB | Without provenance | Details for vcr-stub-server-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vcr_stub_server-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for vcr_stub_server-0.1.4-py3-none-any.whl |
Total release size: 11.6 kB
Release files / vcr-stub-server-0.1.4.tar.gz
| Download URL | vcr-stub-server-0.1.4.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
912b4d0ac1cad02515ae539c3536adab5e0544e66c9d24293d9cf5f089db465a
|
|
BLAKE2b-256 checksum How to use checksums |
762d02efe054b714042ffbebbb093ebe3d76e4898798e5c2ee238d6c1e44c0c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.6.9 Darwin/16.7.0
|
Release files / vcr_stub_server-0.1.4-py3-none-any.whl
| Download URL | vcr_stub_server-0.1.4-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b31327bc63fb43be1c70e245d588486f2ec112a247b42df28c71f599b845490
|
|
BLAKE2b-256 checksum How to use checksums |
2dd55286969aec1777822c30a9711007833160046fbc77f3a08740b27307e42c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.6.9 Darwin/16.7.0
|
Security for vcr-stub-server 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.