Skip to main content

ipcq

A simple inter-process communication (IPC) Queue built on top of the built-in library multiprocessing.

Quick Start

Server

import ipcq


with ipcq.QueueManagerServer(address=ipcq.Address.DEFAULT, authkey=ipcq.AuthKey.DEFAULT) as server:
    server.get_queue().get()

Client

import ipcq


client = ipcq.QueueManagerClient(address=ipcq.Address.DEFAULT, authkey=ipcq.AuthKey.DEFAULT)
client.get_queue().put('a message')

Please checkout out the examples folder for more examples.

API

class ipcq.QueueManagerServer(address: Optional[str], authkey: Optional[bytes])

This class inherits multiprocessing.managers.BaseManager.

address can be ipcq.Address.AUTO, ipcq.Address.CWD or any other path described in str. When it's given ipcq.Address.AUTO, a random address will be chosen. ipcq.Address.CWD means using a file that lives in the current working directory.

authkey is just like the password for authentication. It can be ipcq.AuthKey.AUTO, ipcq.AuthKey.DEFAULT, ipcq.AuthKey.EMPTY or any other arbitrary bytes.

def get_queue(ident: Union[AnyStr, int, type(None)] = None) -> queue.Queue

The method returns a queue.Queue corresponding with ident. The returned queue is shared between the server and the client. So both the server and the client access to the same queue.

ident is the identity, it can be any string-like object, int or None. The default is None. It is used for differetiate the obtained queues. Different idents refer to different queues.

class ipcq.QueueManagerClient(address: Optional[str], authkey: Optional[bytes])

This class inherits multiprocessing.managers.BaseManager.

address can be ipcq.Address.CWD or any other path described in str. When the server is set with ipcq.Address.CWD and the client is running in the same CWD that the server runs, the client can be set with ipcq.Address.CWD as well. Otherwise, it should be the same with the address field in the server instance.

authkey is just like the password for authentication. It has to be the same with what's set on the server . If the server was set with ipcq.AuthKey.DEFAULT or ipcq.AuthKey.EMPTY, the client can just be set with the same.

def get_queue(ident: Union[AnyStr, int, type(None)] = None) -> queue.Queue

The method returns a queue.Queue corresponding with ident. The returned queue is shared between the server and the client. So both the server and the client access to the same queue.

ident is the identity, it can be any string-like object, int or None. The default is None. It is used for differetiate the obtained queues. Different idents refer to different queues.

Metadata

Release files for ipcq 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipcq 1.1.3
File Size Uploaded Provenance Actions
ipcq-1.1.3.tar.gz 8.3 kB Without provenance Details for ipcq-1.1.3.tar.gz

Release files / ipcq-1.1.3.tar.gz

Download URL ipcq-1.1.3.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
87a6c391359437d54a34c39be13f94c9152bf4e82396c17f0d85bca74fa75827
BLAKE2b-256 checksum
How to use checksums
579613efe5d9e8f1ad50f3e9ffd733d1a58ff094048f604ed2388705306dc715
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.4 Windows/10

Security for ipcq 1.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page