dwhall / farc

Framework for state machines with run-to-completion concurrency using asyncio. Python 3.4 or later
MIT License
28 stars 6 forks source link
asyncio fsm hierarchical-state-machine hsm python state-machine

farc

Framework for Asyncio/Actor/AHSM Run-to-completion Concurrency written in Python3. In other words, a cheap knock-off of QP that uses Python3 coroutines. This book describes QP and how to program statecharts(a.k.a. hierarchical state machines).

This package is 100% Python with no required external dependencies. This framework has fewer than 1000 LOC. It allows the programmer to create highly-concurrent programs by using a message-passing system and run-to-completion message handlers within a state-machine architecture. With these tools, complex, asynchronous operations are decomposed into managable chunks of code.

Known Issue: On windows, Ctrl+C is supressed by asyncio event loop's run_forever() (bug report). The workaround is to inject an event to awake the event loop.

Note: This project used to be called "pq" but that name was taken in PyPI, so I renamed to farc (ugh).

Code Repository

https://github.com/dwhall/farc

Release History

2020/11/07 0.2.0

2019/05/15 0.1.1

2018/10/09 0.1.0 Initial release