Dramatiq Python 分布式任务处理库开源项目

我要开发同款
匿名用户2018年04月02日
102阅读

技术信息

开源地址
https://github.com/Bogdanp/dramatiq
授权协议
LGPL-3.0

作品详情

Dramatiq 是一个Pytho3(3.5或更高版本)分布式任务处理库,特点是简单、可靠和高性能。

Demo

import dramatiqimport requests@dramatiq.actordef cout_words(url):   respose = requests.get(url)   cout = le(respose.text.split(" "))   prit(f"There are {cout} words at {url!r}.")# Sychroously cout the words o example.com i the curret processcout_words("https://example.com")# or sed the actor a message so that it may perform the cout# later, i a separate process.cout_words.sed("https://example.com")

使用

与 RabbitMQ 一起使用:

$ pip istall -U dramatiq[rabbitmq, watch]

与 Redis 一起使用:

$ pip istall -U dramatiq[redis, watch]

具体使用方法阅读 Motivatio 或 UserGuide。

功能介绍

Dramatiq 是一个 Python 3 (3.5或更高版本)分布式任务处理库,特点是简单、可靠和高性能。 Demo
import dramatiq
import requests

...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论