Skip to main content

A intuitive and cross-languige RCP lib for Python.

Project description

InteractionFree for Python

InteractionFree is a remote procedure call (RPC) protocol based on ZeroMQ. It allows the developers to build their own distributed and cross-languige program easily. The protocol is config-less and extremly easy to use. Currently, Msgpack is used for binary serialization. InteractionFree implementation is already available in various languages (including Scala, Javascript, Arduino). More infomation will be available soon.

  • InteractionFree specification: to be drafted.

Quick Start

Install

$ pip install interactionfreepy

Start the sever

from interactionfreepy import IFBroker

broker = IFBroker('tcp://*:port')
IFLoop.join()

replace port to any port number that is available.

IFLoop.join() is a utility function to prevent the program from finishing.

Start a worker

from interactionfreepy import IFWorker

class Target():
    def tick(self, message):
        return "tack %s" % message

worker = IFWorker('tcp://address:port', 'TargetService', Target())
IFLoop.join()

replace address and port to the server's net address and port.

Start a client

from interactionfreepy import IFWorker

client = IFWorker('tcp://address:port')
print(client.TargetService.tick('now'))

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

interactionfreepy-1.0.10.tar.gz (9.1 kB view details)

Uploaded Source

File details

Details for the file interactionfreepy-1.0.10.tar.gz.

File metadata

  • Download URL: interactionfreepy-1.0.10.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

File hashes

Hashes for interactionfreepy-1.0.10.tar.gz
Algorithm Hash digest
SHA256 6da0d11c2680d9ab51acd025151a0f773b4911534510351c8771890442ecfd43
MD5 5ee030a2cfe51fa1a4d09d3a2a76a8e1
BLAKE2b-256 5a50c327f58602fce890cff3f99bf0b67d378475cb0207655de88f356e4a43bf

See more details on using hashes here.

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