Skip to main content

Gevent powered cross service communication tool

Project description

This tool is aimed to provide simple and customizable interface for communication between different services over sockets. No encryption yet.

Simple example:


from crosservice.signals import BaseSignal

class PingSignal(BaseSignal):
    _host = ''
    _port = 5555
    signal = 'ping'
    expect_data = ['time']

if __name__ == '__main__':
    ping = PingSignal({'foo': 'bar'})
    if ping.result:
        print, ':', ping.result.time
        print "Error: ", ping.result.error


from crosservice.server import start_server
from crosservice.handlers import BaseHandler
import time

class PingHandler(BaseHandler):
    signal = 'ping'
    required_data = ['foo']

    def run(self, foo):
        if foo == 'bar':
            foo = 'received at'
   = foo
            self.result.time = time.time()
            self.result.error = 'Bad foo!'

if __name__ == '__main__':
    start_server('', 5555, 1000)

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

crosservice-0.2.6.tar.gz (18.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page