Sridhar Ratnakumar
Sridhar Ratnakumar

Reputation: 85272

A simple framework for Google App Engine (like Sinatra)?

Is there a simple 'wrapper' framework for appengine? Something like Sinatra or Juno? So that one can write code like the following:

from juno import *

@route('/')
def index(web):
    return 'Juno says hi'

run()

UPDATE: I want to use the Python API (not Java) in GAE.

Upvotes: 5

Views: 1319

Answers (6)

weakish
weakish

Reputation: 29902

Bottle is one-single-file framework, so it's very easy to deploy it on GAE.

Bottle is similar with Sinatra, see the "hello world" example below:

Sinatra:

require 'sinatra'
get '/hi' do
  "Hello World!"
end

Bottle:

from bottle import *
@get('/hi')
    def hi():
        return "Hello World!"

Though I have to admit that Ruby is better for DSL.

Upvotes: 1

Nick Johnson
Nick Johnson

Reputation: 101139

There are several frameworks either specifically for App Engine, or well suited to it:

Upvotes: 7

Seb
Seb

Reputation: 17795

I use web.py. It's really simple and doesn't get in your way.

This is how it looks:

import web

urls = (
    '/(.*)', 'hello'
)
app = web.application(urls, globals())

class hello:        
    def GET(self, name):
        if not name: 
            name = 'world'
        return 'Hello, ' + name + '!'

if __name__ == "__main__":
    app.run()

Upvotes: 2

Deepak Sarda
Deepak Sarda

Reputation: 1068

Another framework that I've been meaning to try out is Bloog. It is actually a blog engine for GAE but also provides a framework for developing other GAE apps.

Upvotes: 1

Alex Martelli
Alex Martelli

Reputation: 881557

No such framework has been released at this time, to the best of my knowledge (most people appear to be quite happy with Django I guess;-). You could try using Juno with this patch -- it doesn't seem to be quite ready for prime time, but then again, it IS a pretty tiny patch, maybe little more is needed to allow Juno to work entirely on GAE!

Upvotes: 2

Ted Naleid
Ted Naleid

Reputation: 26791

You should check out gaelyk. It's a lightweight framework on top of appengine that uses groovy.

Upvotes: 0

Related Questions