Related Topics

Quick search

Dramatiq is a distributed task processing library for Python with
a focus on simplicity, reliability and performance.

Here’s what it looks like:

importdramatiqimportrequests@dramatiq.actordefcount_words(url):response=requests.get(url)count=len(response.text.split(" "))print(f"There are {count} words at {url!r}.")# Synchronously count the words on example.com in the current processcount_words("http://example.com")# or send the actor a message so that it may perform the count# later, in a separate process.count_words.send("http://example.com")