A python remote communications library
Project description
# kiwipy
kiwipy is a library that makes remote messaging EASY. So far, there is support for:
* RPC
* Broadcast
* Task queue messages
Let's dive in.
## RPC
```python
from kiwipy.rmq import *
communicator = RmqCommunicator(RmqConnector('amqp://localhost'))
def square(x):
return x * x
# Register an RPC subscriber with the name square
communicator.add_rpc_subscriber(square, 'square')
# Send an RPC message
communicator.rpc_send_and_wait('square', 10)
>>> 100
```
kiwipy is a library that makes remote messaging EASY. So far, there is support for:
* RPC
* Broadcast
* Task queue messages
Let's dive in.
## RPC
```python
from kiwipy.rmq import *
communicator = RmqCommunicator(RmqConnector('amqp://localhost'))
def square(x):
return x * x
# Register an RPC subscriber with the name square
communicator.add_rpc_subscriber(square, 'square')
# Send an RPC message
communicator.rpc_send_and_wait('square', 10)
>>> 100
```
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
kiwipy-0.1.0.dev12.tar.gz
(29.7 kB
view hashes)
Built Distribution
Close
Hashes for kiwipy-0.1.0.dev12-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a833666c94f7905ccc5449073563fe438c732b6f542da177f9574929f149a50f |
|
MD5 | 4c828fca2c49a42b0044ff8e0c8ead07 |
|
BLAKE2b-256 | e1a6bb2913e311247de19d5c63ab9c9722999d031109129b168dadd76971d9a3 |