No project description provided
Project description
ipcq
A simple inter-process communication (IPC) Queue built on top of the built-in library multiprocessing.
Quick Start
On the server side
import ipcq
with ipcq.QueueManagerServer(address=ipcq.Address.DEFAULT, authkey=ipcq.AuthKey.DEFAULT) as server:
server.get_queue().get()
On the client side
import ipcq
client = ipcq.QueueManagerClient(address=ipcq.Address.DEFAULT, authkey=ipcq.AuthKey.DEFAULT)
client.get_queue().put('a message')
Example
Please checkout out the examples folder.
API
class ipcq.QueueManagerServer
Constructor
The same with multiprocessing.managers.BaseManager, please refer to it.
Methods
All methods in multiprocessing.managers.BaseManager are inherited. The followings are the addtions.
get_queue(ident: Optional[Union[AnyStr, int, type(None)]] = None) -> queue.Queue
ident
is the identity, it can be string-like objects, int
or None
. The default is None
. This is for differetiate the obtained queues.
Return a queue corresponded with then ident
.
class ipcq.QueueManagerClient
Constructor
The same with multiprocessing.managers.BaseManager, please refer to it.
Methods
All methods in multiprocessing.managers.BaseManager are inherited. The followings are the addtions.
get_queue(ident: Optional[Union[AnyStr, int, type(None)]] = None) -> queue.Queue
ident
is the identity, it can be string-like objects, int
or None
. The default is None
. This is for differetiate the obtained queues.
Return a queue corresponded with then ident
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.