Skip to main content

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', '')
# Don't forget to add a save callback to the response Deferred.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for stenographer, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size stenographer-0.1.3-py2-none-any.whl (12.2 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size stenographer-0.1.3.tar.gz (9.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page