My favorites | Sign in
Project Logo
                
Feeds:

Overview

Drop-in server for Google App Engine applications which exposes your data model via a REST API with no extra work.

Example

The Boomi Demo App Engine application is a fully working example application (based on the Google App Engine Greeting demo application).

Setup

Utilizing this library is extremely simple. Assuming you have the library code installed under the directory "rest" within your application, you would add the following to your main application code:

import rest

# add a handler for "rest" calls
application = webapp.WSGIApplication([
  <... existing webservice urls ...>
  ('/rest/.*', rest.Dispatcher)
], ...)

# configure the rest dispatcher to know what prefix to expect on request urls
rest.Dispatcher.base_url = "/rest"

# add all models from the current module, and/or...
rest.Dispatcher.add_models_from_module(__name__)
# add all models from some other module, and/or...
rest.Dispatcher.add_models_from_module(my_model_module)
# add specific models
rest.Dispatcher.add_models({
  "foo": FooModel,
  "bar": BarModel})

Client Usage

Once this server has been installed in your application, the basic usage is as follows (assuming you installed the REST API with the url prefix "/rest" as shown above).









Hosted by Google Code