1. Lynn Rees
  2. wsgigzip

Source

wsgigzip /

Filename Size Date modified Message
wsgigzip
215 B
464 B
175 B
2.6 KB
45.5 KB

Decorator for flup's gzip compression WSGI middleware

Usage example:

from wsgigzip import gzip

@gzip()
def index(environ, start_response):
    start_response('200 OK', [('Content-type', 'text/plain')])
    return ['Home Page']

if __name__ == '__main__':
    from wsgiref.simple_server import make_server
    http = make_server('', 8080, index)
    http.serve_forever()