CherryPy

From Encoresoup - The Ultimate Guide to Free/Open Source Software

Jump to: navigation, search
This article contains content from the Wikipedia article:
CherryPy
history contributors

CherryPy
CherryPy library
Developer: [[Developer::CherryPy team]]
Stable release

3.1  (30 June 2008)

OS: Cross-platform
Genre: Web application framework
License: BSD License
Website: http://www.cherrypy.org


CherryPy is an object-oriented web application framework using the Python programming language. It is designed for rapid development of web applications by wrapping the HTTP protocol but stays at a low level and does not offer much more than what is defined in RFC 2616.

CherryPy can be a web server itself or one can launch it via any WSGI compatible environment (including Apache 2). It does not deal with tasks such as templating for output rendering, backend access, authentication protocols. The framework is extensible with filters, simple interfaces made of seven functions. These are called at defined points in the request/response processing.

Contents

[edit] Pythonic interface

One of the goals of the project founder, Remi Delon, was to make CherryPy as pythonic as possible. This allows the developer to use the framework as any regular Python module and to forget (from a technical point of view) that the application is for the web.

For instance, the common Hello World program with CherryPy 3 would look like:

import cherrypy
 
class HelloWorld(object):
    @cherrypy.expose
    def index(self):
        return "Hello World!"
 
cherrypy.quickstart(HelloWorld())

[edit] Further reading

[edit] See also

  • CherryTemplate - a templating language for CherryPy
  • TurboGears - CherryPy is a main component of TurboGears

[edit] External links

Template:Python Web Application Frameworks

Personal tools

Sneaky Uses For Everyday Things [ThinkGeek] LED Binary Watch - Yes, it shows the time in Binary! [ThinkGeek]Dive Into Python [Amazon]