views:

433

answers:

5

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.

A: 

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

Ted Naleid
But that is for the Java API; I need one for the Python API.
Sridhar Ratnakumar
+2  A: 

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!

Alex Martelli
Yea, I already looked at this patch before .. it disables templates/ORM resulting in a pretty useless framework.
Sridhar Ratnakumar
@Sridhar, obviously you can't have ORMs in GAE since there's no R (GAE's storage is non-relational), and the templates available are only those you can do in pure Python (django being most popular, though I still like my ancient YAPTU;-), not jinja or others needing C-coded extensions. To use App Engine effectively, you must accept its limitations -- non-relational storage, and pure-Python-only extensions.
Alex Martelli
True, but at least Juno's "Person = model('Person', ...)" API could be translated to the underlying appengine models. That patch didn't cover that.
Sridhar Ratnakumar
@Sridhar, yep, it's a tiny patch -- not quite ready, as I said, but close enough to "need little more" (within what _can_ be done on GAE of course) -- only the Juno maintainers know their plans for sure, but one or two volunteers to help on this might make all the difference.
Alex Martelli
+1  A: 

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.

antrix
+1  A: 

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()
Sebastjan Trepča
+4  A: 

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

Nick Johnson
Thanks. A quick look at the mentioned frameworks suggests that `kay` is something I'd like better than the others. I will spend some time with `kay` and report my thoughts on it later.
Sridhar Ratnakumar