tgext.xmlrpc

TurboGears XMLRPC Controller
Download

tgext.xmlrpc Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Price:
  • FREE
  • Publisher Name:
  • Michael J. Pedersen
  • Publisher web site:
  • http://www.insidetrac.org/

tgext.xmlrpc Tags


tgext.xmlrpc Description

tgext.xmlrpc is a TurboGears extension that provides an easy method to allow XMLRPC calls to be performed by your TurboGears application.Installation1. Add it to your project. This is accomplished by modifying your setup.py. Add "tgext.xmlrpc" to your **install_requires** list.2. Run {{{python setup.py develop}}} in your project to get it installed.UsageUsage is quite simple. Create a controller, decorate the XMLRPC methods, and mount your controller somewhere. This can be done as follows:{{{from tgext.xmlrpc import XmlRpcController, xmlrpcclass MyXmlRpcCenter(XmlRpcController): @xmlrpc(, ], helpstr="Adds numbers together") def addit(self, *p, **kw): return sum(p)}}}And then, in your controller, add the following line:{{{ xmlrpc = MyXmlRpcCenter()}}}That's it, you now have a working XMLRPC interface on your system. If you added it to your RootController, you may visit http://localhost:8080/xmlrpc and get the help page. You may send an XMLRPC request to the method 'addit', and get the result.Product's homepage


tgext.xmlrpc Related Software