A lightweight, event-driven concurrency library with bees!
- Free software: MIT License
- Documentation: https://pybeehive.readthedocs.io.
- One interface for writing concurrent code, both sync and async
from pybeehive import Hive
import time
hive = Hive()
@hive.streamer
def stream():
while True:
time.sleep(1)
yield 'hello world!'
@hive.listener
def on_event(event):
print(event)
if __name__ == '__main__':
hive.run()
$ python hello.py
Event(created_at=1525400000, data="hello world!")
Event(created_at=1525400001, data="hello world!")
Event(created_at=1525400002, data="hello world!")
...