Chapter 17.3. CherryPy Filters

CherryPy also has hooks for running special functions called filters at several different points in the request cycle, before and after the published object is executed.

Filters allow for a lot of flexibility in the way requests are handled. CherryPy comes with several built-in filters to do caching, session management, compression, XML Remote Procedure Call (RPC) request processing, and to otherwise slice and dice the request object in interesting ways. But wait, that’s not all. CherryPy also provides an easy-to-use mechanism for you to create your own custom filters, which are applied to whichever sections of your object hierarchy you choose.

But it’s likely that future versions of TurboGears will use a somewhat ...

Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.