百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

dramatiq

> 数据库
开源

一个为 Python 3 打造的快速、可靠的后台任务处理库。

5.3K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个为 Python 3 打造的快速、可靠的后台任务处理库。

dramatiq

一个面向 Python 3 的快速且可靠的分布式任务处理库。


更新日志:https://dramatiq.io/changelog.html
社区:https://groups.io/g/dramatiq-users
文档:https://dramatiq.io


赞助商

安装

如果你想将它与 RabbitMQ 一起使用

bash
pip install 'dramatiq[rabbitmq, watch]'

或者如果你想将它与 Redis 一起使用

bash
pip install 'dramatiq[Redis, watch]'

快速开始

确保 RabbitMQ 正在运行,然后创建一个名为 example.py 的新文件:

python
import dramatiq
import requests
import sys

@dramatiq.actor
def count_words(url):
    response = requests.get(url)
    count = len(response.text.split(" "))
    print(f"There are {count} words at {url!r}.")

if __name__ == "__main__":
    count_words.send(sys.argv[1])

在一个终端中,运行你的 worker:

dramatiq 示例

在另一个终端中,开始将消息加入队列:

Python example.py http://example.com
Python example.py https://github.com
Python example.py https://news.ycombinator.com

查看[用户指南]以了解更多信息!

许可证

dramatiq 基于 LGPL 许可证授权。请参阅 COPYING 和 COPYING.LESSER 了解许可详情。

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythondistributed-lockpythonrabbitredis

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库