Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Functional Python Programming, 3rd edition - Third Edition

You're reading from  Functional Python Programming, 3rd edition - Third Edition

Product type Book
Published in Dec 2022
Publisher Packt
ISBN-13 9781803232577
Pages 576 pages
Edition 3rd Edition
Languages
Author (1):
Steven F. Lott Steven F. Lott
Profile icon Steven F. Lott

Table of Contents (18) Chapters

Preface
Chapter 1: Understanding Functional Programming Chapter 2: Introducing Essential Functional Concepts Chapter 3: Functions, Iterators, and Generators Chapter 4: Working with Collections Chapter 5: Higher-Order Functions Chapter 6: Recursions and Reductions Chapter 7: Complex Stateless Objects Chapter 8: The Itertools Module Chapter 9: Itertools for Combinatorics – Permutations and Combinations Chapter 10: The Functools Module Chapter 11: The Toolz Package Chapter 12: Decorator Design Techniques Chapter 13: The PyMonad Library Chapter 14: The Multiprocessing, Threading, and Concurrent.Futures Modules Chapter 15: A Functional Approach to Web Services Other Books You Might Enjoy
Index

15.3 Defining web services as functions

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.

The direct use of WSGI for this kind of application isn’t optimal because we need to create a great deal of ”boilerplate” processing for all the details of conventional website processing. A more effective approach is to use a more sophisticated web server like Flask, Django, Bottle, or any of the frameworks listed here: https://wiki.python.org/moin/WebFrameworks. These servers handle the conventional cases more completely, allowing us—as developers—to focus on the unique features of a page or site.

We’ll use a simple dataset with four series of data pairs: 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}