Skip to main content

Ipcqueue provides POSIX and SYS V message queues functionality to exchange data among processes.

Project description

This package provides SYS V and POSIX message queues to exchange data among processes. Both queues have similar functionality with some differences. Queues are persistent in the kernel unless either queue is closed/unlinked or system is shut down. Unlike multiprocessing.Queue, the same queue can be joined by different processes according to its unique name/key, it’s not necessary to fork main process. Be careful if you use signals in your application, because signal interrupts sending or receiving message.

Installation

Requires Python CFFI, C compiler and Python header files.

cd ipcqueue/
python setup.py install

Usage

>>> from ipcqueue import posixmq
>>> q = posixmq.Queue('/foo')
>>> q.qsize()
0
>>> q.put([1, 'A'], priority=1)
>>> q.put([2, 'B'], priority=2)
>>> q.put([3, 'C'], priority=1)
>>> q.qsize()
3
>>> q.get()
[2, 'B']
>>> q.get()
[1, 'A']
>>> q.get()
[3, 'C']
>>> q.close()
>>> q.unlink()

>>> from ipcqueue import sysvmq
>>> q = sysvmq.Queue(1)
>>> q.qsize()
>>> q.put([1, 'A'], msg_type=1)
>>> q.put([2, 'B'], msg_type=2)
>>> q.put([3, 'C'], msg_type=2)
>>> q.put([4, 'D'], msg_type=1)
>>> q.qsize()
4
>>> q.get(msg_type=2)
[2, 'B']
>>> q.get()
[1, 'A']
>>> q.get()
[3, 'C']
>>> q.get()
[4, 'D']
>>> q.close()

Documentation

http://pythonhosted.org/ipcqueue

License

3-clause BSD

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

ipcqueue-0.9.7.tar.gz (16.7 kB view details)

Uploaded Source

Built Distributions

ipcqueue-0.9.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.8 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

ipcqueue-0.9.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ipcqueue-0.9.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ipcqueue-0.9.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (53.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

ipcqueue-0.9.7-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (53.2 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

File details

Details for the file ipcqueue-0.9.7.tar.gz.

File metadata

  • Download URL: ipcqueue-0.9.7.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for ipcqueue-0.9.7.tar.gz
Algorithm Hash digest
SHA256 92d3361afe04a24d89b0b25485f6634c8c51aad465ae7a564cc4b81f7e04cf64
MD5 b8d8a40bebe47cef11e0ba9a48658689
BLAKE2b-256 96610bcedb021d3a19c3cb961c99655d563dd9c006919780929d8bedaeb1c640

See more details on using hashes here.

File details

Details for the file ipcqueue-0.9.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ipcqueue-0.9.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 392e3b4231d76af2e958a6c150c71dbf76c673133108a01c748d3338f73fb6c4
MD5 33a6af6edebc1e01e68b3c95fd89ec69
BLAKE2b-256 cd53e2d16ed38ca17f9289728530bc9ef68d03c0af9ea23fac06c1ec4a0987d8

See more details on using hashes here.

File details

Details for the file ipcqueue-0.9.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ipcqueue-0.9.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 616f81d4d75d92518281cb2b8941c9448ee6ea18ad7c05c350932f0c2ac93122
MD5 381d99bb1296dbfb29b052abc42590b7
BLAKE2b-256 088341d0783d5f70cd6e13d972fa12f3804b44834c172f179f3d77534f24fc7e

See more details on using hashes here.

File details

Details for the file ipcqueue-0.9.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ipcqueue-0.9.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 142b02cc135cce3802ff3660ef0c1e4e297948ea57465fea491a1591640b0aa3
MD5 20e84641865cb4997770dbc403b80ca2
BLAKE2b-256 bf384100f77708ab834913770198f56b4d1ce3c3fc0e366920249e13eb974ce8

See more details on using hashes here.

File details

Details for the file ipcqueue-0.9.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ipcqueue-0.9.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 038760dd7d21ee1a05886b563c85bb99d29e2ec2bada96cba5a03cbd788ae350
MD5 8647bd8e36d12af4db06703fc4456989
BLAKE2b-256 3f1d719c3898369ebb1d0f6570374f48c8499fcb53e71b3bcc2f2e6aef0543b3

See more details on using hashes here.

File details

Details for the file ipcqueue-0.9.7-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ipcqueue-0.9.7-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 23044a66ea22346ad92686f8236a01859b0576b71eefb3dcc9e41fa69622ed1c
MD5 fb1ee88a4ecce7cacb068b690ec5a2e6
BLAKE2b-256 517e5b4a644b2a2b6af449c66bf258e26f70cafa42686cfcb412895c27e75794

See more details on using hashes here.

Supported by

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