A simple DAG-based computation model
Project description
ezmsg
Messaging and Multiprocessing.
ezmsg
is a pure-python implementation of a directed acyclic graph (DAG) pub/sub messaging pattern based on labgraph
which is optimized and intended for use in constructing real-time software. ezmsg
implements much of the labgraph
API (with a few notable differences), and owes a lot of its design to the labgraph
developers/project.
ezmsg
is very fast and uses Python's (currently) new multiprocessing.shared_memory
module to facilitate efficient message passing without C++ or any compilation/build tooling.
Installation
pip install ezmsg
Dependencies
Due to reliance on multiprocessing.shared_memory
, ezmsg
requires minimum Python 3.8. Beyond that, ezmsg
is a pure Python library with no external dependencies.
Testing ezmsg
requires:
pytest
pytest-cov
pytest-asyncio
numpy
Setup (Development)
$ python3 -m venv env
$ source env/bin/activate
(env) $ pip install --upgrade pip
(env) $ pip install -e ".[test]"
(env) $ python -m pytest tests # Optionally, Perform tests
Documentation
Some documentation is available in the docs
directory.
ezmsg
is very similar to labgraph
, so you might get a primer with their documentation and examples. Additionally, there are many examples provided in the examples/tests directories strewn throughout this repository.
Extensions
See the extension directory for more details
ezmsg-sigproc
-- Timeseries signal processing modulesezmsg-websocket
-- Websocket server and client nodes forezmsg
graphsezmsg-zmq
-- ZeroMQ pub and sub nodes forezmsg
graphs- ... More to come!
Every extension has its own set of additional dependencies. Once ezmsg is installed, these can be installed manually with:
(env) $ pip install -e extensions/[extension]
Once ezmsg
has been packaged and is available on PyPI (which it isn't quite yet) you may have luck batch installing all extensions with:
(env) $ pip install ".[all_ext]"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.