Skip to content
/ pmpi Public

Python Message Passing Interface with Pipe communication

License

Notifications You must be signed in to change notification settings

ap-atul/pmpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pmpi

Python Message Passing Interface using Pipe communication

A simple message passing between different process. Useful in scenarios where the main process (UI) required output from long running process (mostly progress bar/ logs).

Construct a communication, add your functions to be called on data received.

Get it

  1. Install
pip3 install git+https://github.com/AP-Atul/pmpi
  1. Clone and install
git clone https://github.com/AP-Atul/pmpi.git
python3 setup.py install

Usage

from pmpi import Communication

# create comm object
comm = Communication()

# add an id and function
comm.register("my_sick_function", func_name)

# get the sender
sender = comm.sender()

# use that sender to send message using id anywhere
sender.send("my_sick_function", "very_secret_data")

# finally close the comm
comm.end()

About

Python Message Passing Interface with Pipe communication

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages