Skip to main content

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

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

Constructor

The same with multiprocessing.managers.BaseManager, please refer to it for more info.

address can be ipcq.Address.AUTO or ipcq.Address.CWD. 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 or ipcq.AuthKey.EMPTY.

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 for more info.

address can be ipcq.Address.AUTO or ipcq.Address.CWD. 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 or ipcq.AuthKey.EMPTY.

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.

Source Distribution

ipcq-1.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipcq-1.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file ipcq-1.1.0.tar.gz.

File metadata

  • Download URL: ipcq-1.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/2.7.16 Darwin/19.5.0

File hashes

Hashes for ipcq-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5895ab70599a6ef5b265de0570ce089d6fe8b71b37215d84f61e1510b253e7e0
MD5 85b04659bab525aeb05185b1a4e3bf7f
BLAKE2b-256 f2784ea1fa2f4f80b742efebf5309bab61bc266bdfa83e406d972b900b1634bf

See more details on using hashes here.

File details

Details for the file ipcq-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: ipcq-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/2.7.16 Darwin/19.5.0

File hashes

Hashes for ipcq-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 149638e9689668990ffedcbe79e2073466a32dd206f2acc592f2fac63bc97d15
MD5 eb591a540484d6c1b21c322fe35381ef
BLAKE2b-256 2ad940c816f6dfaf958756d08bf180f76ca710edcda2df786a653a7ec679e7cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page