A Python AJAX Stubbing API


A few months ago (this was written in February 2007) I decided to start looking into AJAX. My engineering experience has mostly been in writing servers, threaded application, etc. in Java, Python, and some in C. When I started to play with AJAX I had to add JavaScript to my repertoire. I have always applied the rules of abstraction to my code and I wasn't going to change with JavaScript, so I started searching the NET for what the best practices were in AJAX implementations. I found some interesting stuff on Web Services, REST (Representational State Transfer), RPC (Remote Procedure Call), SOAP (Simple Object Access Protocol), and the list goes on. I've done a lot of work with XMLRPC, so I thought I'd look for something in that vein. I found only one API for RPC written in Python that seemed to work, but when I looked at the code I realized that it was very immature, so I rolled my own. So, here is my contribution to the OpenSource community. It is only in its early stages, but is quite functional already.


The idea behind AjaxStub is to provide an API that will let you write Python methods or functions that will be called by an identically named function in JavaScript. The AJAX communication is completely abstracted from the developer. You write your Python API and a few JavaScript functions and you're done. Well it may not be that easy depending on what you are trying to achieve with your site, however, the concept is really very simple.


The latest code: ajaxstub-0.3.0.tar.gz

Browse the download directory for older versions and documentation: All Files

Online documentation is here: HTML Documentation

API documentation is here: HTML API Documentation

The latest version is completed. There is also PDF documentation in the download directory. Come back often, this is an active project with frequent updates. I'm looking for people to help test this code. Please contact me if you wish to contribute. My email address is at the bottom of the page.

Example Code

Choose an example from the select box below to see some of the functionality of this API.