A minimal multi producer single consumer IPC using redis pub/sub
Project description
Redis IPC
A lightweight multiple producer and single consumer IPC server that uses redis pubsub as a broker
Creates a redis ipc server that listens on a single pub/sub channel and allows you to communicate between multiple processes
Subclass the IPC class and add your handlers as methods
like this (handlers must start with handle_
as their name)
async def handle_channel_update(self, data):
return data
or use IPC.add_handler
to add the handler after the
class has been instantiated
and whenever a process calls IPC.get
, all the clients connected to
that channel will try to handle the request and whichever one finishes
first, will be returned by the function
the handler must either return a dict or None
None
is treated as an implicit reason that the current
process doesn't matches the requests' target process
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
Built Distribution
Hashes for redis_ipc-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2720b0c97e8d956f7e47ec7b892a5e175e6c033cb661d90cca264b559cb116f6 |
|
MD5 | 8546d9a442dca3ce11baaf69f9e79201 |
|
BLAKE2b-256 | e191ae2d1d51ce737ddba93681e2ed71301ff186db3c06f3819ae820d289695f |