pecan.rest – Pecan REST Controller

The pecan.rest module includes support for writing fully RESTful controllers in your Pecan application.

class pecan.rest.RestController(*args, **kwargs)

Bases: object

A base class for REST based controllers. Inherit from this class to implement a REST controller.

RestController implements a set of routing functions which override the default pecan routing with behavior consistent with RESTful routing. This functionality covers navigation to the requested resource controllers, and the appropriate handling of both the common (GET, POST, PUT, DELETE) as well as custom-defined REST action methods.

For more on developing RESTful web applications with Pecan, see Writing RESTful Web Services with Generic Controllers.