ANN: CherryPy-2.0-final released

1 view
Skip to first unread message

May 4, 2005, 11:13:50 AM5/4/05
Hello everyone,

I am happy to announce the first stable release of CherryPy-2.

CherryPy-2 is a pythonic, object-oriented web development framework.

CherryPy-2 is a redesign of CherryPy-1 (the unpythonic features have
been removed): no more compilation step, pure python source code (no
more "CherryClass").

Here is a sample Hello, World in CherryPy-2:

# from cherrypy import cpg
# class HelloWorld:
# @cpg.expose
# def index(self):
# return "Hello world!"
# cpg.root = HelloWorld()
# cpg.server.start()

Main properties:
- this code starts a multi-threaded HTTP server that dispatches
requests to methods
- requests like "http://domain/dir/page?arg1=val1&arg2=val2" are
mapped to "'val1', arg2='val2')"
- CherryPy also supports "positional" arguments in URLs like
- requests are mapped to an object tree that is "mounted" on cpg.root
(for instance: "cpg.root.user", "cpg.root.user.remi", ...)
- method must be explicitely exposed with a decorator "@cpg.expose"
(or " = True" for Python-2.3)
- methods can return a generator instead of a string (useful when
generating big pages)

Here is a non-exhaustive list of CherryPy-2 features:
multi-threaded HTTP server, XML-RPC server, sessions, form handling,
authentication, unicode support, gzip-compression, virtual hosting,
WSGI adapter

The design of CherryPy-2 allows to easily write/use pluggable "filters"
or "modules":
- filters perform operations on the request/response such as
gzip-compression or string encoding
- modules are web applications (like a blog or a web forum) than can
be easily "mounted" anywhere you want in your website

CherryPy-2 is already used in production by many sites and is
supported by an active community.


Reply all
Reply to author
0 new messages