一个轻量级的,事件驱动的并发库!
pybeehive的Python项目详细描述
蜂巢
一个轻量级的,事件驱动的并发库!
- 自由软件:GNU通用公共许可v3
- 文档:https://pybeehive.readthedocs.io。
功能
- 一个用于编写同步和异步并发代码的接口
基本用法
frompybeehiveimportHiveimporttimehive=Hive()@hive.streamerdefstream():whileTrue:time.sleep(1)yield'hello world!'@hive.listenerdefon_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!") ...
学分
这个包是用Cookiecutter和audreyr/cookiecutter-pypackage项目模板创建的。
历史记录
0.1.0(2018-05-27)
- pypi上的第一个版本。
0.11(2018-05-28)
- 修复了依赖项的安装
0.12(2018-05-28)
- 固定Travis CI建筑,覆盖范围
0.13(2018-05-28)
- 覆盖率现在只在travis ci上运行,只有pybeehive源代码
0.14(2018-05-29)
- 修正了事件传播中的错误