Notice!
PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities.
Create your free Platform account
to download ActivePython or customize Python with the packages you require and get automatic updates.
Download
ActivePython
INSTALL>
pypm install cassette
How to install cassette
- Download and install ActivePython
- Open Command Prompt
- Type
pypm install cassette
| Python 2.7 | Python 3.2 | Python 3.3 |
---|
Windows (32-bit) | | | |
---|
Windows (64-bit) | | | |
---|
Mac OS X (10.5+) | | | |
---|
Linux (32-bit) | | | |
---|
Linux (64-bit) | | | |
---|
Lastest release
version 0.2 on Aug 4th, 2013
Cassette stores and replays HTTP requests made in your Python app.
System Message: ERROR/3 (<string>, line 6)
Unknown directive type "code".
.. code:: python
import urllib2
import cassette
with cassette.play("data/responses.yaml"):
# If the request is not already stored in responses.yaml, cassette
# will request the URL and store its response in the file.
r = urllib2.urlopen("http://www.internic.net/domain/named.root")
# This time, the request response must be in the file. The external
# request is not made. cassette retrieves the response from the
# file.
r = urllib2.urlopen("http://www.internic.net/domain/named.root")
assert "A.ROOT-SERVERS.NET" in r.read(10000)
Installation
System Message: ERROR/3 (<string>, line 28)
Unknown directive type "code-block".
.. code-block:: sh
$ pip install cassette
License
cassette is available under the MIT License.
Copyright Uber 2013, Charles-Axel Dein <charles@uber.com>