Lamantin AI
Infrastructure

plump-ipc

A lightweight, asyncio-native IPC framework for talking across process boundaries.

★ 6·Python·MIT

Get the heavy work off the event loop.

Python's GIL and the single-threaded asyncio loop turn CPU-bound work into a bottleneck: one blocking call and everything else waits. PlumpIPC moves that work into another process and keeps the loop answering.

The interface is the same on both sides of the boundary — a synchronous call() and an asyncio-native acall() over the same registered command.

  • Dual interface Sync and async callers reach the same worker without two APIs to maintain.
  • Commands by decorator Register a function and it becomes an RPC-style endpoint; stateful services and standalone functions both work.
  • An event bus PlumpQueue broadcasts events to non-blocking asyncio listeners.
  • Pluggable serialization Pickle and JSON built in, with an interface for your own format.

Registering work.

A decorator on the worker side is the whole contract.

worker.py
$ pip install plump-ipc

from plump_ipc import plump

@plump.command()
def update_stream(stream_id: int, settings: dict):
    ...
    return True

def start_worker(conn):
    plump.child_conn = conn
    plump.run_worker()