ANN: CherryPy-2.1.0-beta released

0 views
Skip to first unread message

re...@cherrypy.org

unread,
Jul 14, 2005, 6:10:13 PM7/14/05
to
Hello everyone,

I am happy to announce the first beta release of CherryPy-2.1

This release is a major step forward for CherryPy. It is packed
with new features and bug fixes. Also, the CherryPy community is
now growing quite fast and it is very active. Many people contributed
to this release.

Here are the main improvements in this release:
- New WSGI interface, which allow CherryPy sites to be deployed on
any WSGI server. People are already running it on mod_python, FastCGI,
SCGI, IIS or CherryPy's own built-in HTTP server.
- New implementation for sessions, which supports multiple backends
- Built-in list of convenient "filters" for things like gzip
compression,
XHTML validation, caching, unicode decoding/encoding, authentication,
XML-RPC wrapper, etc ... These filters can easily be enabled/disabled
through configuration.
- New "development" mode which provides things like autoreload (no
need to manually restart your server when you make a change), logging
of page stats, etc ...
- Better handling of file uploads
- Internal implementation now uses generators everywhere (no more
StringIO)
- New built-in HTTP server implementation


***************
About CherryPy:

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

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

# import cherrypy
# class HelloWorld:
# @cherrypy.expose
# def index(self):
# yield "<html><body>"
# yield "Hello world!"
# yield "</body></html>"
# cherrypy.root = HelloWorld()
# cherrypy.server.start()

Main properties:
- this code starts a multi-threaded HTTP server that dispatches
requests to methods
- requests like "http://domain/dir/page?arg1=va l1&arg2=val2" are
mapped to "dir.page(arg1='val1', arg2='val2')"
- CherryPy also supports "RESTful" URLs like
http://domain/book/science/9
- requests are mapped to an object tree that is "mounted" on
cherrypy.root
(for instance: "cherrypy.root.user", "cherrypy.root.user.remi", ...)
- method must be explicitly exposed with a decorator "@cherrypy.expose"
(or "index.exposed = True" for Python-2.3)

Remi.

http://www.cherrypy.org

Damjan

unread,
Jul 15, 2005, 1:15:16 PM7/15/05
to
> I am happy to announce the first beta release of CherryPy-2.1

Can you briefly compare CherryPy to Quixote2 (+session2)?

> unicode decoding/encoding,

This especially interesting to me.
Is CherryPy completelly unicode (and UTF-8) ready.
The thing that frustrates me about quixote2 is that it has a lot of
assumptions that text is a str object in the latin1 encoding.
I succeded to patch quixote to be usable but that may not be enough.

My quixote application works with unicode objects all the time, and the only
place I want UTF-8 is when the content is sent to the client... (or when
its stored in a database or file which I handle myself fine).

--
damjan

Robert Brewer

unread,
Jul 15, 2005, 1:53:32 PM7/15/05
to Damjan, pytho...@python.org
Damjan wrote:
> > I am happy to announce the first beta release of CherryPy-2.1
> ...

> > unicode decoding/encoding,
>
> This especially interesting to me.
> Is CherryPy completelly unicode (and UTF-8) ready?

> The thing that frustrates me about quixote2 is that it has a lot of
> assumptions that text is a str object in the latin1 encoding.
> I succeded to patch quixote to be usable but that may not be enough.
>
> My quixote application works with unicode objects all the
> time, and the only place I want UTF-8 is when the content
> is sent to the client... (or when its stored in a database
> or file which I handle myself fine).

Encoding is a snap in CherryPy 2.1. Write your application using unicode
objects, then have all output converted to UTF-8 by simply writing in
your config file:

encodingFilter.on = True

To use a different encoding, write:

encodingFilter.encoding = "ascii"

Encoding is restricted to a limited set of MIME types; 'text/html' is
the default list. To change that, use the config entry:

encodingFilter.mimeTypeList = ['text/html', 'text/plain']

All of these configuration entries are specifiable per-path, so
different portions of your site can use different encoding schemes.


Robert Brewer
System Architect
Amor Ministries
fuma...@amor.org

Reply all
Reply to author
Forward
0 new messages