27 December 2006 15:15
CherryPy 2.2 : CherryPy Tutorial
CherryPy is a pythonic, object-oriented web development framework. It provides the foundation over which complex web-based applications can be written, with little or no knowledge of the underlying protocols. CherryPy allows developers to build web applications in much the same way they would build any other object-oriented Python program. This usually results in smaller source code developed in less time.
CherryPy does its best to stay out of the way between the programmer and the problem. CherryPy applications are usually very simple. It works out of the box; default behavior is sensible enough to allow use without extensive setup or customization. The embedded web server allows one to deploy web applications anywhere Python is installed. In short, CherryPy is as pythonic as it gets.
What CherryPy is NOT?
As a web application framework, CherryPy does all that is necessary to allow Python code to be executed when some resource (or URL) is requested by the user. However, it is not a templating language, such as PHP. CherryPy can work with several templating packages, including Cheetah, CherryTemplate, and several others. But please note that, while useful to some extent, templating packages are not strictly necessary, and that pure Python code can be used to generate the Web pages.
CherryPy includes a light embedded web server, capable enough to handle sizeable loads. It is estimated that CherryPy can handle about 500 requests/second on a reasonable configuration (as of January, 2005); this can be roughly translated to a sustained throughput of 15 Mbps. However, CherryPy is not Apache. If for any reason you need a enterprise-class web server, you can run CherryPy and Apache together.
1
(2 marks)