Any pointers, advice on implementing a REST API on App Engine with Python? Using webapp for the application itself.

What I currently know is that I can:

hack up my own webapp handlers for handling REST-like URIs, but this seems to lose its elegance for larger amounts of resources. I mean, it's simple when it comes to temperature/atlanta, but not so much* for even a rather simple /users/alice/address/work (though do keep in mind that I'm not saying this after having implemented that, just after spending some time trying to design an appropriate handler, so my perception may be off).

use the REST functionality provided by one of the bigger Python web frameworks out there. I have some unexplainable sympathy towards web2py, but, since it's not used for the project, bundling it with the application just to provide some REST functionality seems.. overkill?

(Huh, looks like I don't like any of these approaches. Tough.)

So here's me asking: what advice, preferably based on experience, would you have for me here? What are my options, is my view of them correct, did I miss something?

@Paolo I was going to suggest Appengine Rest Server too, but after reading the documentation I have not found any pointers on complex url pattern like the one suggested by the OP.
–
systempuntooutAug 5 '11 at 19:25

ProtoRPC is bundled with the SDK, and it is robust and actively developed (however experimental). Although I think the source code itself is a little convoluted, the feature-set is pretty complete and it was made by someone with experience in creating this kind of library. It supports transmiting using JSON, ProtocolBuffer and URL-encoded formats.

Also, you can create APIs that work on the server side and client side -- it defines a 'message' protocol with implementations in Python and JavaScript. I used other "RESTful" Python libraries, but no other provided this consistency out of the box.

Can ProtoRPC take different actions based on the HTTP method used?
–
maligreeAug 5 '11 at 11:28

1

@moraes, would you be kind enough to either show or point to me to some example code of that being done? I've read most of the introduction article in the App Engine docs and so far I haven't seen anything like that happen.
–
maligreeAug 5 '11 at 14:31

1

@maligree I think it is not trivial. I regret suggesting ProtoRPC as it is not primarily made for this, as systempuntoout pointed out. It can be, but you must be familiar with its internals. Sorry for the noise.
–
moraesAug 5 '11 at 16:14