Skip to content

A lightweight, event-driven concurrency library with bees!

License

Notifications You must be signed in to change notification settings

sentrip/pybeehive

Repository files navigation

pybeehive

Documentation Status Updates

A lightweight, event-driven concurrency library with bees!

Features

  • One interface for writing concurrent code, both sync and async

Basic Usage

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!")
...

About

A lightweight, event-driven concurrency library with bees!

Resources

License

Stars

Watchers

Forks

Packages

No packages published