Package wsgiwapi :: Module application :: Class Resource
[frames] | no frames]

Class Resource

source code

object --+
         |
        Resource

A resource, used to support a set of different methods at a given URI.

In wsgiwapi.make_application, instances of this class can be used as callables, e.g.:

make_application({'foo': Resource(foo_get, foo_post)})

You can also make subclasses, and implement the desired methods in the subclasses.

Instance Methods
 
__init__(self, get=None, post=None, put=None, delete=None, head=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__call__(self, request, pathinfo) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  get = None
  post = None
  put = None
  delete = None
  head = None
  valid_methods = set(('get', 'post', 'put', 'delete', 'head',))
Properties

Inherited from object: __class__

Method Details

__init__(self, get=None, post=None, put=None, delete=None, head=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)