We'll look at a RESTful web service, which can slice and dice a source of data and provide downloads as JSON, XML, or CSV files. We'll provide an overall WSGI-compatible wrapper. The functions that do the real work of the application won't be narrowly constrained to fit the WSGI standard.
We'll use a simple dataset with four subcollections: the Anscombe Quartet. We looked at ways to read and parse this data in Chapter 3, Functions, Iterators, and Generators. It's a small set of data but it can be used to show the principles of a RESTful web service.
We'll split our application into two tiers: a web tier, which will be a simple WSGI application, and data service tier, which will be more typical functional ...