This post originated from an RSS feed registered with Python Buzz
by Mark Ramm.
Original Post: Json, XML-RPC, Soap and TurboGears
Feed Title: Compound Thinking
Feed URL: http://compoundthinking.com/blog/index.php/category/programming/feed/
Feed Description: New perspectives on Information Technology.
In the TurboGears book we focused on building web applications, but TurboGears is equally useful for creating web services.
It is remarkably easy to use TurboGears to respond to requests, with JSONified data. TurboGears automatically turns python dictionaries into JSON so you can write something like this:
@expose(template=.templates.hello)
@expose(allow_json=True)
def hello:
return [...]