A lightweight, event-driven concurrency library with bees!
Project description
pybeehive
A lightweight, event-driven concurrency library with bees!
Free software: GNU General Public License v3
Documentation: https://pybeehive.readthedocs.io.
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!")
...
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2018-05-27)
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pybeehive-0.1.0.tar.gz
(19.9 kB
view hashes)
Built Distribution
Close
Hashes for pybeehive-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2364ca3dcda72ee8aec244d24af7057d75452da752dad272cdd2d24f54899fed |
|
MD5 | fc23647fbbb6bf92d26d056a91733a99 |
|
BLAKE2b-256 | f27d79d787ae67553fe089bb8968d7118fad4446a7b6abfc8f2f8c96f1a01932 |