Earlier quoted context omitted.
I believe the intent is to be Rack[1] for Python. The beauty of Rack is that I can build a new web framework, web server, or web app plugin and have it "just work" with the rest of the ecosystem. And because the Rack API is so simple, building to spec is easy. In the Ruby world if I want to use the awesome library Sass all I have to do is: gem install sass Because it functions as a Rack plugin it automatically works…
# WSGI def app(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) yield 'Hello World\n' # Rack app = proc do |env| [ 200, {'Content-Type' => 'text/plain'}, "a" ] end WSGI is the Rack for Python. In fact, WSGI predates Rack, and Rack is WSGI inspired.
# Pump
def app(request):
return {
"status": 200,
"headers": {"content_type": "text/plain"},
"body": "Hello World"}