Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Functional Python Programming
  • Toc
  • feedback
Functional Python Programming

Functional Python Programming

By : Steven F. Lott
4 (9)
close
Functional Python Programming

Functional Python Programming

4 (9)
By: Steven F. Lott

Overview of this book

This book is for developers who want to use Python to write programs that lean heavily on functional programming design patterns. You should be comfortable with Python programming, but no knowledge of functional programming paradigms is needed.
Table of Contents (18 chapters)
close
17
Index

The WSGI standard

The Web Server Gateway Interface (WSGI) defines a relatively simple, standardized design pattern for creating a response to a web request. The Python library's wsgiref package includes a reference implementation of WSGI.

Each WSGI "application" has the same interface:

def some_app(environ, start_response):
    return content

The environ is a dictionary that contains all of the arguments of the request in a single, uniform structure. The headers, the request method, the path, any attachments for forms or file uploads will all be in the environment. In addition to this, the OS-level context is also provided along with a few items that are part of WSGI request handling.

The start_response is a function that must be used to send the status and headers of a response. The portion of a WSGI server that has final responsibility for building the response will use a start_response function to send the headers and the status as well as to build the response text. For...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete