webi is specification of python web applications interface to web servers.
It builds upon WSGI, PEP 444, Rack, PSGI/Plack, ring, plug, clack and other similar specifications.
A webi application can be implemented by any python callable, with environment argument, which returns a tuple of status, headers and body as a response.
def application(environment):
return 200, {'Content-Type': 'text/plain'}, environment['REQUEST_METHOD']environment must be dictionary of CGI-like headers such as REQUEST_METHOD, SCRIPT_NAME, PATH_INFO, QUERY_STRING, SERVER_NAME, SERVER_PORT, HTTP_ Variables etc. In addition, environment must also contain webi specific headers prefixed with webi..
Is one of the http status codes, such as 200, 404, 500, 303 etc.
Is a dictionary, with keys and values as string, except for multiple header values, where the value is a list of strings. Applications can send webi. prefixed directive headers to web servers, which will not be sent to client.
Could be string, file, iterable or anything that can be represented by a string.
Thank you all, who have worked upon WSGI, PEP 444, Rack, PSGI/Plack, ring, plug and clack.