Skip to main content

System V IPC primitives

Python bindings for System V IPC: semaphores, message queues, and shared memory.

Thin wrappers around the syscalls. Failures raise OSError with the kernel errno.

Examples:

import atexit
import sysvipc

# Semaphores
sem = sysvipc.semget(sysvipc.IPC_PRIVATE, 1, 0o600)
atexit.register(lambda: sysvipc.semctl(sem, 0, sysvipc.IPC_RMID))

sysvipc.semop(sem, [(0, 1, sysvipc.SEM_UNDO)])

curval = sysvipc.semctl(sem, 0, sysvipc.GETVAL)

sysvipc.semop(sem, [(0, -1, sysvipc.SEM_UNDO)])

# Message queues
msqid = sysvipc.msgget(sysvipc.IPC_PRIVATE, 0o600)
atexit.register(lambda: sysvipc.msgctl(msqid, sysvipc.IPC_RMID))

sysvipc.msgsnd(msqid, 1, "hello")
mtype, message = sysvipc.msgrcv(msqid, 0, 1024)

# Shared memory
shmid = sysvipc.shmget(sysvipc.IPC_PRIVATE, 4096, 0o600)
atexit.register(lambda: sysvipc.shmctl(shmid, sysvipc.IPC_RMID))

with sysvipc.shmat(shmid) as mem:
    memoryview(mem)[0:5] = b"hello"
    print(bytes(memoryview(mem)[0:5]))

Metadata

Release files for sysvipc-python 1.1.0

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

Source distribution (sdist)

Source distribution for sysvipc-python 1.1.0
File Size Uploaded Provenance Actions
sysvipc_python-1.1.0.tar.gz 6.2 kB Without provenance Details for sysvipc_python-1.1.0.tar.gz

Release files / sysvipc_python-1.1.0.tar.gz

Download URL sysvipc_python-1.1.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ebb1daa99bd478311aabbe27d76b70b2d10e0a8545ad77ff311eeb8977dfc4e4
BLAKE2b-256 checksum
How to use checksums
ddd0c67d21938e60687faf65aa3d88ec186f401ef19337c23e082167670a129b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for sysvipc-python 1.1.0

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

1 release file No provenance

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