An HTTP interaction recorder for Twisted Web
Project description
An HTTP interaction recorder for Twisted Web. It aims to be compatible with the cassette format used by the VCR library for Ruby and ports like Betamax for Python, but with an API based on Twisted Web Agents.
Stenographer is not production-ready software. It’s currently composed mostly of bits hacked out of Omnipresence’s test helpers, is nowhere near feature parity with VCR, and ironically doesn’t have a comprehensive test suite. Improvements are welcome.
Basic usage, in case the warning above wasn’t scary enough:
from stenographer import CassetteAgent
from twisted.internet import reactor
from twisted.web.client import Agent, RedirectAgent
# Use CassetteAgent to wrap the innermost agent object. In most
# cases, this will be the basic Agent in twisted.web.client.
cassette_agent = CassetteAgent(Agent(reactor), 'cassette_path.json')
agent = RedirectAgent(cassette_agent)
deferred = agent.request('GET', 'http://www.example.com/')
# Don't forget to add a save callback to the response Deferred.
deferred.addCallback(cassette_agent.save)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stenographer-0.1.3.tar.gz.
File metadata
- Download URL: stenographer-0.1.3.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1e33c03bc27bc5b66e977be4f7c60cd7c5f12110866b2ea000c6826e521020e
|
|
| MD5 |
7c80292e2e89e0e9b422df87ea413048
|
|
| BLAKE2b-256 |
cfd337f847ed5d785f4018db57ce9ee013a60a6dbdecd238477c3d439611684c
|
File details
Details for the file stenographer-0.1.3-py2-none-any.whl.
File metadata
- Download URL: stenographer-0.1.3-py2-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea5148faaca4992cf3511f5732a30c1a3b9c92dfd3550966ad541c1af5e5808
|
|
| MD5 |
479ba3767b081b517e8f46102c72f77c
|
|
| BLAKE2b-256 |
0fb670c68e03b13025d01e3a9fcd1bc4c48541bc5f3b5ad66f1c9ff5ef5cb993
|