[Twisted-web] Twisted and RESTful app
bernat at luffy.cx
Wed Aug 1 08:42:03 EDT 2007
I would like to add a RESTful interface to an existing Twisted
application. To allow a human to interact easily with the
application, I want to output bare minimal XHTML (1990 HTML
without any presentation, just some class to allow to easily
parse the result).
I have looked at twisted.web framework. One good point is that
there are different methods for each action (GET, HEAD, POST,
PUT, DELETE). However, there is nothing to generate XHTML easily.
I have looked at Nevow which contains two interesting ways to
generate XHTML code (Stan and templates). But the only method to
render is renderHTTP. I suppose that the HTTP action is somewhere
in the context, but I did not find where yet.
I could mix twisted.web with Stan or with Nevow templates. I
could also just use twisted.web and use ElementTree to generate
simple XHTML page. But do some of you have some suggestions about
implementing a RESTful service using Twisted ?
More information about the Twisted-web