[Web-SIG] Ann: CherryPy-2.0-beta released
Remi Delon
remi at cherrypy.org
Mon Jan 3 18:53:43 CET 2005
Hello everyone,
I am happy to announce the release of CherryPy-2.0-beta.
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 "dir.page(arg1='val1', arg2='val2')"
- 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 "index.exposed = 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 (experimental)
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 several sites and is
supported by an active community.
Remi.
http://www.cherrypy.org
PS: Is the "Python Web Framework Shootout"
(http://www.colorstudy.com/docs/shootout.html) still being maintained ?
The part about CherryPy is quite out-of-date so it would be nice if
it could be updated for CherryPy-2 (I can provide some content if
needed)
More information about the Web-SIG
mailing list