Skip to main content

Asynchronous XML-RPC and FastPRC client for Python's Tornado

Project description


tornado-fastrpc is deprecated, for XML-RPC use instead of this library. async-rpc is based on asyncio, so it is not only for Tornado, but for asyncio in generral. Do you need FastRPC? Create an issue, I have library for FastRPC too, but it has not been published yet. However, I thint, it never mind, probably nobody outsite use FastRPC :-).


Non-blocking XML-RPC and FastRPC (see client for Python’s Tornado. If FastRPC is not available, only XML-RPC protocol will be supported. Python 2.7 and Python 3.4 (or higher) are supported.



  • pycurl

  • Tornado 3.2 or higher

Optional requirements:

  • fastrpc (libfastrpc + fastrpc Python’s module)

Instalation and tests:

python install
python test

Build Debian Jessie package (requires dpkg-buildpackage + lintian and dependencies in Build-Depends option in debian/control file. Before building package, checkout debian-* branch.

python bdist_deb


proxy = ServerProxy('',

class BazHandler(tornado.web.RequestHandler):

    def get(self):
            res = yield proxy.getData(123)
        except Exception as e:
            self.write('Error: {}'.format(e))
            self.write('Data: {}'.format(res.value))

class BarHandler(tornado.web.RequestHandler):

    def get(self):
        res = yield proxy.getData(123, quiet=True)
        if res.success:
            self.write('Data: {}'.format(res.value))
            self.write('Error: {}'.format(res.exception))


ServerProxy class

class tornado_fastrpc.client.ServerProxy(uri, connect_timeout=5.0, timeout=5.0, use_binary=False, user_agent=None, keep_alive=False, use_http10=True, http_proxy=None, max_clients=10)

Async FastRPC client for Tornado, tt uses pycurl backend. Manages communication with a remote RPC server.

  • url <string>

    URL address

  • connect_timeout <float>

    Timeout for initial connection in seconds

  • request_timeout <float>

    Timeout for entire request in seconds

  • use_binary <bool>

    Force binary protocol

  • user_agent <string>

    User-Agent string

  • keep_alive <bool>

    Allow keep-alive connection

  • use_http10 <bool>

    Force HTTP/1.0 protocol instead of HTTP/1.1

  • http_proxy <string>

    HTTP proxy, eg.

  • max_clients <int>

    Size of the Curl’s connection pool

Result object

class tornado_fastrpc.client.Result(success, value, exception)

Return type for FastRPC call. Contains attributes:

  • success <bool>

    True if operation succeeded, else False

  • value

    contains returning value if operation succeeded, else None

  • exception <bool>

    contains instance of the exception if operation failed, else None

Fault object

class tornado_fastrpc.client.Fault(faultCode, faultString)

Exception, indicates an XML-RPC error.

  • faultCode <string>

    Error code

  • faultString <string>

    Error message


3-clause BSD

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tornado-fastrpc-1.0.1.tar.gz (7.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page