CherryPy Essentials: Rapid Python Web Application Development
|Also available on:|
- Walks through building a complete Python web application using CherryPy 3
- The CherryPy HTTP:Python interface
- Use CherryPy with other Python libraries
- Design, security, testing, and deployment
Book DetailsLanguage : English
Paperback : 272 pages [ 235mm x 191mm ]
Release Date : March 2007
ISBN : 1904811841
ISBN 13 : 9781904811848
Author(s) : Sylvain Hellegouarch
Topics and Technologies : All Books, Web Development, Content Management (CMS), Open Source
Table of Contents
Chapter 1: Introduction to CherryPy
Chapter 2: Download and Install CherryPy
Chapter 3: Overview of CherryPy
Chapter 4: CherryPy in Depth
Chapter 5: A Photoblog Application
Chapter 6: Web Services
Chapter 7: The Presentation Layer
Chapter 8: Ajax
Chapter 9: Testing
Chapter 10: Deployment
Download the code and support files for this book.
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata- 1 submitted: last submission 02 Aug 2013
Errata type: Typo | Page number: 0
In the IP address replace "1102.168" with "192.168", throughout the book.
Errata type:Code | Page number:14
The default directories where packages and modules are stored are: On MacOS --- begin is --- Python:Lib:site-packages --- end is --- --- begin should be --- /Library/Python/2.5/site-packages --- end should be ---
Errata type:Code | Page number:52
'Multiple HTTP Servers' section is now obsolete. Check out at- http://www.cherrypy.org/ticket/752 Ticket #752 (defect) Return cherrypy.server to a single-server model Changeset 1822 Timestamp: 11/10/07 19:37:41 Author: fumanchu Changeset 1824 Timestamp: 11/11/07 13:47:09 Author: fumanchu
Errata type: Typo | Page number: 53
Use the IP addresses "192.168.0.12" & "192.168.0.27" instead of the IP addresses mentioned in the book.
Errata type: Typo | Page number:53
Replace the port number "100100" with "10100".
Errata type: Typo | Page number: 63
Replace the digest 'a104a8fe5ccb110ba61c4c0873d3101e10871082fbbd3' with 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3'.
Errata type:Typo | Page number: 77
In the third paragraph, under "Creating a tool", replace "using the ElementTree library" with "using the ElementTree and Amara libraries".
Errata type: Typo | Page number: 96
Replace "There is no RDBMS written in Python but most RDBMSes can be accessed via a corresponding Python library." with "Most RDBMSes can be accessed via a corresponding Python library."
Errata type: Code | Page number: 177
dejsonifier tool doesn't work if the content-type contains aditional values like: application/json; charset=UTF-8. So I suggest to replace the line: if cherrypy.request.headers['content-type'] == 'application/json: to: if u'application/json' in cherrypy.request.headers['content-type']:
Errata type: Typo | Page number: 236
In the final code snippet, replace 'tools.staticfilE.file' with 'tools.staticfile.file'.
What you will learn from this book
- The book will be about CherryPy 3
- CherryPy installation using the tarball, egg, and subversion
- The CherryPy library in depth: its design and how to use it
- Using CherryPy with common Python and non-Python products
- Object Relational Mapping with SQLObject, SQLAlchemy, and Dejavu
- Web Services via REST and the Atom Publishing Protocol
- AJAX and client-side scripting via MochiKit
- Unit, functional, and load testing
- CherryPy, Apache, and lighttpd deployment solutions
CherryPy is a Python library for web development that allows developers to build web applications in the same way as any other object-oriented Python program. Enriched by several years of active development, it has become one of the most established toolkits for building solid and high-performance web applications in Python. CherryPy abstracts the complex low-level HTTP protocol into an easy-to-use interface that respects Python idioms. The library aims at being simple to learn for a beginner while offering the most advanced features to fluent Python developers. For these reasons CherryPy was chosen to be at the heart of the popular and feature-rich TurboGears web framework. CherryPy-powered web applications are stand-alone Python applications with their own embedded multi-threaded web server, but can also run behind Apache or IIS for scalability.
This book covers the CherryPy library for Python web development from its history and installation through its main features and core concepts to its integration with Python and other products to construct, test, and deploy a sample photoblog application. The author Sylvain Hellegouarch is dedicated to the development of free software projects and has been coordinating and administrating the community efforts around the CherryPy project since 2004. The approach based on an example application introduces many other common Python libraries, providing transferable skills also relevant for non-web Python projects.
The book starts with two chapters dedicated to CherryPy, its history and installation. It then moves through a gentle introduction to the main features and concepts of CherryPy to a thorough review of its core capabilities. After laying this foundation the book dives into a real-world example, detailing important steps in the creation of a photoblog application. These chapters cover database manipulation via Object Relational Mapping (ORM), using web services to enhance the application, and client-side scripting through
Who this book is for
This book is principally geared towards Python web developers, who are looking to add the power of the CherryPy library to their existing Python skillset. It assumes a good working knowledge of Python. Although the CherryPy toolkit is at the core of the book, many other common libraries are introduced