hermes消息代理的python接口。
pyhermes的Python项目详细描述
##皮赫尔墨斯[版本徽章](https://badge.fury.io/py/pyhermes.png)(https://badge.fury.io/py/pyhermes.png)
[![构建状态](https://travis-ci.org/allegro/pyhermes.png?branch=master)(https://travis ci.org/allegro/pyhermes)
简单地说:
`` python
pip install pyhermes
````
>然后在一个项目中使用它:
`` python
`` pyhermes
```导入pyhermes
`````
` ` ` ` ` `
<
<
<
<
<
<
<
<
<
<
<
若要为特定订阅主题创建处理程序,请使用“subscribe”修饰函数`装饰器:
``python
import pyhermes
@pyhermes.subscriber(topic='pl.allegro.pyhermes.sample topic')
def handler(data):
``process data
```
hermes中的一些主题:
`` python
导入pyhermes
@pyhermes.publisher(topic='pl.allegro.pyhermes.sample topic')
定义我的复杂函数(a,b,c):
结果=a+b+c
发布(我的复杂函数)。{{complex{complex{complex{result}
````
>还可以直接发布函数的结果:
``python
impimportpyhermes
@pyhermes.publisher(topic='pl.allegro.pyhermes.pyhermes.sample topic'auto pupupupupu publish result=true)
def my_complex函数(a,b,c)
返回{complex{complex结果:a+b+c}`````
```结果修饰后的函数会自动发布到hermes中的选定主题。
`` python
源代码<;yourvirtualenv>;/bin/activate
(myenv)$pip install-r requirements/test.txt
(myenv)$python runtests.py
`````
*[Cookiecutter DjangoPackage](https://github.com/pydanny/Cookiecutter DjangoPackage)
django 1.10和django开发版的测试
>
*为django应用配置自定义标签11
<0.2.0(2016-11-03)
*修复与pyhermes.decorators.subscriber(将订户模块重命名为订阅订户)
*允许定制对subcriber函数的包装
*对事件id和重试次数的附加日志记录
*对django<;=1.7的附加支持
*原始数据只转储到调试日志。
0.1.2(2016-04-20)0.1.2(2016-04-04-20)0.1.0(2016-04-04-13)对subcriber函数的附加日志记录
*对django<;=1.7
*对django<;=1.7.1.2(2016-04-20)
>
[![构建状态](https://travis-ci.org/allegro/pyhermes.png?branch=master)(https://travis ci.org/allegro/pyhermes)
简单地说:
`` python
pip install pyhermes
````
>然后在一个项目中使用它:
`` python
`` pyhermes
```导入pyhermes
`````
` ` ` ` ` `
<
<
<
<
<
<
<
<
<
<
<
若要为特定订阅主题创建处理程序,请使用“subscribe”修饰函数`装饰器:
``python
import pyhermes
@pyhermes.subscriber(topic='pl.allegro.pyhermes.sample topic')
def handler(data):
``process data
```
hermes中的一些主题:
`` python
导入pyhermes
@pyhermes.publisher(topic='pl.allegro.pyhermes.sample topic')
定义我的复杂函数(a,b,c):
结果=a+b+c
发布(我的复杂函数)。{{complex{complex{complex{result}
````
>还可以直接发布函数的结果:
``python
impimportpyhermes
@pyhermes.publisher(topic='pl.allegro.pyhermes.pyhermes.sample topic'auto pupupupupu publish result=true)
def my_complex函数(a,b,c)
返回{complex{complex结果:a+b+c}`````
```结果修饰后的函数会自动发布到hermes中的选定主题。
`` python
源代码<;yourvirtualenv>;/bin/activate
(myenv)$pip install-r requirements/test.txt
(myenv)$python runtests.py
`````
*[Cookiecutter DjangoPackage](https://github.com/pydanny/Cookiecutter DjangoPackage)
django 1.10和django开发版的测试
>
*为django应用配置自定义标签11
<0.2.0(2016-11-03)
*修复与pyhermes.decorators.subscriber(将订户模块重命名为订阅订户)
*允许定制对subcriber函数的包装
*对事件id和重试次数的附加日志记录
*对django<;=1.7的附加支持
*原始数据只转储到调试日志。
0.1.2(2016-04-20)0.1.2(2016-04-04-20)0.1.0(2016-04-04-13)对subcriber函数的附加日志记录
*对django<;=1.7
*对django<;=1.7.1.2(2016-04-20)
>