There's more...

A web service can be visualized as a number of common pieces that are connected together into nested shells or layers. The uniform interface for WSGI applications encourages this kind of composition of reusable features.

There are a number of common techniques that are used to protect and produce dynamic content. These techniques are cross-cutting concerns for web service applications. We have a few choices for this as follows:

  • We can write lots of if statements in a single application
  • We can extract the common programming and create a common wrapper that separates security concerns from the construction of content

A wrapper is simply another WSGI application that doesn't produce a result directly. Instead, a wrapper hands ...

Get Modern Python Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.