My favorites | Sign in
Project Hosting will be READ-ONLY Thursday at 3:00pm UTC for up to 3 hours for network maintenance.
Project Home Downloads Wiki Issues Source
Search
for
Usage  

Featured
Updated Feb 4, 2010 by mikeal.rogers

Example

Below is an example server using wsgiref (available in stdlib as of python2.5)

from wsgiref import simple_server
import wsgi_jsonrpc
    
class Methods(object):
    def test_1(self):
        return u'test_1'
    def test_2(self, value):
        return value
            
def test_3()
    return 'test3'

methods = Methods()
    
application = wsgi_jsonrpc.WSGIJSONRPCApplication(instance=methods, methods=[test_3])
server = simple_server.make_server('localhost', 80, application)
server.serve_forever()
Comment by gdwar...@gmail.com, Aug 21, 2009

missing colon... def test_3():

Comment by sig.la...@gmail.com, Aug 8, 2011

This JSONRPC module is not per specification.

http://json-rpc.org/wiki/specification#a1.2Response see

error - An Error object if there was an error invoking the method. It must be null if there was no error.

Any intention of fixing?


Sign in to add a comment
Powered by Google Project Hosting