You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
466 B
ReStructuredText
19 lines
466 B
ReStructuredText
5 years ago
|
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()
|
||
|
|
||
|
|