Skip to main content

A tornado RPC framework

Project description

A tornado RPC library.

This RPC framework uses tornado
so its very quick and asynchronous.

This framework supports regular and
asynchronous methods to be registered
with the TornRPCServer. The below example
shows both. The only difference in the
framework is how you register it.
Normal functions are registered using
"server.register()". Async functions
are registered using "server.register_async()".

For more detailed info see the docstring
for TornRPCClient and TornRPCServer.

Example:
### example server code ###

from tornado import gen
from tornrpc.server import TornRPCServer

def test(arg):
return "You said %s" % arg

@gen.coroutine
def testasync(arg):
raise gen.Return("You said async %s" % arg)

server = TornRPCServer()
server.register(test)
server.register_async(testasync)
server.start(8080)

### example client code ###

from tornrpc.client import TornRPCClient

client = TornRPCClient('localhost:8080')
client.test('hi')
client.testasync('hi')

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

TornRPC-1.0.4.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file TornRPC-1.0.4.tar.gz.

File metadata

  • Download URL: TornRPC-1.0.4.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for TornRPC-1.0.4.tar.gz
Algorithm Hash digest
SHA256 7c88253687300e685b1e85b7b1802ae7150ab2b9e60afef40370ae41a288d6d3
MD5 a49118cdc5582e10aa5366ce1a815e67
BLAKE2b-256 faada2a161429801d20849b1d4d370271075ea1a297e1e2df7d50ae08e63c9a3

See more details on using hashes here.

Supported by

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