Skip to main content

A super-lightweight IPC (Inter-Process Communication) protocol over TCP socket.

Project description


ProcBridge is a super-lightweight IPC (Inter-Process Communication) protocol over TCP socket or Unix domain socket. It enables you to send and recieve JSON between processes easily. ProcBridge is much like a simplified version of HTTP protocol, but only transfer JSON values.

Please note that this repo is the Python implementation of ProcBridge protocol. You can find detailed introduction of ProcBridge protocol in the main repository: gongzhang/procbridge.


pip install procbridge==1.2.1


Server Side:

import procbridge as pb

def delegate(method, args):

    # define remote methods:
    if method == 'echo':
        return args

    elif method == 'sum':
        return sum(x for x in args)

    elif method == 'err':
        raise RuntimeError("an server error")

if __name__ == '__main__':
    PORT = 8000
    s = pb.Server('', PORT, delegate)
    print("Server is on {}...".format(PORT))

Client Side:

import procbridge as pb
client = pb.Client('', 8000)

# call remote methods:
client.request("echo", 123) # 123
client.request("echo", ['a', 'b', 'c']) # ['a', 'b', 'c']
client.request("sum", [1, 2, 3, 4]) # 10

Project details

Download files

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

Files for procbridge, version 1.2.1
Filename, size File type Python version Upload date Hashes
Filename, size procbridge-1.2.1-py3-none-any.whl (6.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size procbridge-1.2.1.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View

Supported by

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