Skip to main content

WSGI middleware for recording requests/responses.

Project description

https://travis-ci.org/bninja/wsgim-record.png https://coveralls.io/repos/bninja/wsgim-record/badge.png

WSGI middleware for conditionally recording request/response information.

Install it:

$ pip install wsgim-record
...

and use it:

import wsgim_record

class RecordMiddleware(wsgim_record.RecordMiddleware)

    # tell what to record

    def record_input(self, environ)
        return True

    def record_errors(self, environ)
        return False

    def record_output(self, environ, status, headers, exc_info=None)
        return True

     # what was recorded

     def recorded(self, environ, input, errors, status, headers, output):
         ...

wrapped = RecordMiddleware(app)

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

wsgim-record-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file wsgim-record-0.1.1.tar.gz.

File metadata

File hashes

Hashes for wsgim-record-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2a172de80c1a21ec9a4f7a6c0b4dab09b72d8124c954f9a5504d1352015a47ff
MD5 b6e0b17478ec505ab771568dd113bbf1
BLAKE2b-256 83aeea22c806c4f4d8a9fd0efe4a0d381a2f2bcc0418e05c187d70cb16fefbda

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