Package wsgitools :: Module filters
[hide private]
[frames] | no frames]

Module filters

source code

This module contains a generic way to create middelwares that filter data. The work is mainly done by the WSGIFilterMiddleware class. One can write filters by extending the BaseWSGIFilter class and passing this class (not an instance) to the WSGIFilterMiddleware constructor.

Classes [hide private]
  CloseableIterator
Concatenating iterator with close attribute.
  CloseableList
A list with a close attribute.
  BaseWSGIFilter
Generic WSGI filter class to be used with WSGIFilterMiddleware.
  WSGIFilterMiddleware
This wsgi middleware can be used with specialized BaseWSGIFilters to modify wsgi requests and/or reponses.
  RequestLogWSGIFilter
This filter logs all requests in the apache log file format.
  TimerWSGIFilter
Replaces a specific string in the data returned from the filtered wsgi application with the time the request took.
  EncodeWSGIFilter
Encodes all body data (no headers) with given charset.
  GzipWSGIFilter
Compresses content using gzip.
  ReusableWSGIInputFilter
Make environ["wsgi.input"] readable multiple times.
Functions [hide private]
str
escape_string(string, replacer=['\\x00', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06'...)
Encodes non-printable characters in a string using \xXX escapes.
source code
Variables [hide private]
  __package__ = 'wsgitools'
Function Details [hide private]

escape_string(string, replacer=['\\x00', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06'...)

source code 

Encodes non-printable characters in a string using \xXX escapes.

Parameters:
  • string (str)
Returns: str