Unified XML and JSON RPC Dispatcher for Django

After looking around at the rpc support available in Django, I think I will create and distribute my own application. Here are the goals:

  1. Complete xml and json rpc support
  2. Easy identification of rpc methods by a decorator
  3. Customizable documentation (which is absent from DocXMLRPCServer)
  4. Support rpc introspection
  5. Support for method signatures (which is absent from SimpleXMLRPCServer)
  6. Easy installation and integration into Django projects
  7. Licensed properly for open source or commercial software

Updates to come. I’m off to San Francisco for a weekend of fun.

Django with JsonRPC and XMLRPC

[Edit: take a look at RPC4Django for a JSONRPC and XMLRPC server for Django]

I corresponded recently with a developer working on a Django-powered jsonrpc library. In the past, I have done some work on web applications that require good external interfaces. In some cases, however, it makes sense to make the same methods available via both jsonrpc and xmlrpc.

For javascript and flash, json makes a lot of sense. For communication between client side and server side, jsonrpc works very well since json is natively supported and speed can be more of a factor in presentation. However, if external interfaces are also going to interact with your API, jsonrpc is not as well supported as xmlrpc. Virtually every language has good libraries for xmlrpc. For this reason, it makes good sense to combine the two and make the same methods available to both.

Subversion Backups via Email

I wrote a simple subversion backup script that runs on my hosting provider, webfaction, and backs up my subversion repository. I have this script running in cron and sending periodic backups to gmail. However, it should work on any unix based system with python, gzip, and subversion. Simply set the SMTP settings (configured in the webfaction panel if you have webfaction), your email information and the path to subversion and run the script.

This script requires python 2.5 or 2.6. It will require modification under python 2.4.

In order to use gmail’s smtp server, change your settings like so: