Tau: Python Reactive Programming
A library for composing asynchronous and event-based programs in Python
About Tau
Tau is a functional reactive programming framework designed for Python from the ground up.
import asyncio
from tau.core import RealtimeNetworkScheduler
from tau.event import Lambda
from tau.signal import From
async def main():
scheduler = RealtimeNetworkScheduler()
signal = From(scheduler, ["world"])
Lambda(scheduler.get_network(), signal, lambda x: print(f"Hello, {x[0].get_value()}!"))
asyncio.run(main())
Installation
Tau runs on Python 3.6 or above. To install Tau:
pip3 install pytau
Credits
Thanks to Bjorn Madsen for adding a feature to graph-theory to make Tau's event propagation work.