Metadata-Version: 2.4
Name: interactionfreepy
Version: 1.8.4
Summary: A intuitive and cross-languige RCP lib for Python.
Home-page: https://github.com/hwaipy/InteractionFreePy
Download-URL: https://github.com/hwaipy/InteractionFreePy/archive/v1.8.4.tar.gz
Author: Hwaipy
Author-email: hwaipy@gmail.com
License: gpl-3.0
Keywords: msgpack,zeromq,zmq,0mq,rcp,cross-languige
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: msgpack
Requires-Dist: tornado
Requires-Dist: pyzmq
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary


# InteractionFree for Python

[![](https://img.shields.io/github/actions/workflow/status/hwaipy/InteractionFreePy/tests.yml?branch=master)](https://github.com/hwaipy/InteractionFreePy/actions?query=workflow%3ATests)
[![Documentation Status](https://readthedocs.org/projects/interactionfreepy/badge/?version=latest)](https://interactionfreepy.readthedocs.io/en/latest/?badge=latest)
[![](https://img.shields.io/pypi/v/interactionfreepy)](https://pypi.org/project/interactionfreepy/)
[![](https://img.shields.io/pypi/pyversions/interactionfreepy)](https://pypi.org/project/interactionfreepy/)
[![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/hwaipy/InteractionFreePy/python-coverage-comment-action-data/endpoint.json)](https://github.com/hwaipy/InteractionFreePy/tree/python-coverage-comment-action-data)

[InteractionFree]() is a remote procedure call (RPC) protocol based on [ZeroMQ](https://zeromq.org). 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, [MessagePack](https://msgpack.org) is used for binary serialization. 

Please refer to [here](https://interactionfreepy.readthedocs.io/en/latest/index.html) for the full doc.


## Quick Start

 **Install**

```shell
$ pip install interactionfreepy
```

**Start the broker**

```python
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 server**

```python
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**

```python
from interactionfreepy import IFWorker

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

