Package grassyknoll :: Package frontend :: Module EasyRest :: Class RestApplication
[hide private]

Class RestApplication

source code


A WSGI application for writing RESTful webapps

Instances of the class are WSGI callables (ie, take environ/start_response).

Nested Classes [hide private]
RestRequest subclass requestType
class to use for creating Requests.
Instance Methods [hide private]
 
__init__(self, view, loadSpatch, dumpSpatch)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__call__(self, environ, start_response) source code
 
onError(self, error, environ, start_response)
handle HTTP Exceptions
source code

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

Static Methods [hide private]
 
__fix_method(environ)
Contract: &method=FOO + POST ==> REQUEST_METHOD=FOO
source code
Class Variables [hide private]
dict mimetype2format = {'application/json': 'json', 'text/html': 'h...
a mapping of mimetypes to serialization formats
Instance Variables [hide private]
Spatch dumpSpatch
dispatch for dumping data to Responses
Spatch loadSpatch
dispatch for loading data from Requests
RestView view
a view implementing the application
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, view, loadSpatch, dumpSpatch)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

Class Variable Details [hide private]

mimetype2format

a mapping of mimetypes to serialization formats
Type:
dict
Value:
{'application/json': 'json', 'text/html': 'html', 'text/plain': 'plain\
',}