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 server
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file interactionfreepy-1.2.1.tar.gz
.
File metadata
- Download URL: interactionfreepy-1.2.1.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30b8499af674cce33fc6754cb5f651519144cfedcda56b808ab9169b51f0e3b3 |
|
MD5 | 8d438681155836df6f6a7173b5823c01 |
|
BLAKE2b-256 | b041c59a8058d065240e5d19d9c77b2138b0ebabba67ea6395fd6dbb80e7f665 |