environ variables description wsgi multithread boolean flag that' true if the application can be executed concurrently by another thread in the same process boolean flag that' true if the application can be executed concurrently by another process boolean flag that' true if the application will only be executed once during the lifetime of the executing process wsgi multiprocess wsgi run_once the start_response parameter is callable object of the form start_response(statusheadersthat is used by the application to start response status is string such as ' okor ' not foundheaders is list of tupleseach of the form (namevaluecorresponding to http header to be included in the response--for example('content-type','text/html'the data or body of response is returned by the web application function as an iterable object that produces sequence of byte strings or text strings that only contain characters which can be encoded as single byte ( compatible with the iso- - or latin- character setexamples include list of byte strings or generator function producing byte strings if an application needs to do any kind of character encoding such as utf- it must do this itself here is an example of simple wsgi application that reads form fields and produces some outputsimilar to what was shown in the cgi module sectionimport cgi def subscribe_app(environstart_response)fields cgi fieldstorage(environ['wsgi input']environ=environname fields getvalue("name"email fields getvalue("email"various processing status " okheaders [('content-type','text/plain')start_response(statusheadersresponse 'hi % thank you for subscribing name'you should expect response soon return (line encode('utf- 'for line in responsethere are few critical details in this example first,wsgi application components are not tied to specific frameworkwebserveror set of library modules in the examplewe're only using one library modulecgisimply because it has some convenience functions for parsing query variables the example shows how the start_response(function is used to initiate response and supply headers the response itself is constructed as list of strings the final statement in this application is generator expression that turns all strings into byte strings if you're using python this is critical step--all wsgi applications are expected to return encoded bytesnot unencoded unicode data to deploy wsgi applicationit has to be registered with the web programming framework you happen to be using for thisyou'll have to read the manual lib fl ff