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', '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

stenographer-0.1.3.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

stenographer-0.1.3-py2-none-any.whl (12.2 kB view details)

Uploaded Python 2

File details

Details for the file stenographer-0.1.3.tar.gz.

File metadata

File hashes

Hashes for stenographer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b1e33c03bc27bc5b66e977be4f7c60cd7c5f12110866b2ea000c6826e521020e
MD5 7c80292e2e89e0e9b422df87ea413048
BLAKE2b-256 cfd337f847ed5d785f4018db57ce9ee013a60a6dbdecd238477c3d439611684c

See more details on using hashes here.

File details

Details for the file stenographer-0.1.3-py2-none-any.whl.

File metadata

File hashes

Hashes for stenographer-0.1.3-py2-none-any.whl
Algorithm Hash digest
SHA256 6ea5148faaca4992cf3511f5732a30c1a3b9c92dfd3550966ad541c1af5e5808
MD5 479ba3767b081b517e8f46102c72f77c
BLAKE2b-256 0fb670c68e03b13025d01e3a9fcd1bc4c48541bc5f3b5ad66f1c9ff5ef5cb993

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page