开发者

JSON-RPC server via Python

I need to implement a JSON-RPC server like this: http://pasha.cdemo.applicationcraft.com/service/json

This server will be accessed from jQuery and 开发者_运维技巧I have to use Python for writing it.

What library should I use? Can you also give me an example of using that library?

Thanks.


I found cherrypy very easy to use (doesn't come with a predefined template engine or a database model, so it's IMO better than others when your server is producing json and is not a typical database).

Coupled with nginx and memcached can also be quite performant...


Python 2.6 comes with json module in the standard library which allows you to effective convert Python data structures to JSON responses.

For HTTP communications and request handling, you can use Python web frameworks like Pyramid, Django or HTTP server software like Tornado. It really much depends what do you need to process in your JSON-RPC calls.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜