Package cherrypy :: Package lib :: Module encoding
[hide private]
[frames] | no frames]

Module encoding

source code

Functions [hide private]
 
decode(encoding=None, default_encoding='utf-8')
Decode cherrypy.request.params.
source code
 
decode_params(encoding) source code
 
encode(encoding=None, errors='strict') source code
 
encode_stream(encoding, errors='strict')
Encode a streaming response body.
source code
 
encode_string(encoding, errors='strict')
Encode a buffered response body.
source code
 
find_acceptable_charset(encoding=None, default_encoding='utf-8', errors='strict') source code
 
compress(body, compress_level)
Compress 'body' at the given compress_level.
source code
 
gzip(compress_level=9, mime_types=['text/html', 'text/plain']) source code
Function Details [hide private]

encode_stream(encoding, errors='strict')

source code 

Encode a streaming response body.

Use a generator wrapper, and just pray it works as the stream is being written out.