Welcome to ZeroRQ

Release v0.1a1. (Installation Guide)

AsyncIO Support Badge Codestyle Support Badge License Badge Python Version Support Badge Typing Support Badge Wheel Support Badge

ZRQ (ZeroRQ) is a Python package for building end-to-end asynchronous task queues.


Yet another Python Task Queue. ZRQ lets you run asynchronous tasks at scale with high efficiency, while preserving observability and ease of use.

ZeroRQ stands for Zero Redis Queue. Built around AsyncIO and Redis Streams, it can run millions of I/O-bound jobs per day across thousands of workers

For more details on how and why choosing ZeroRQ, check the Concepts & Architecture page.

In a nutshell

  • Native support of Python Asynchronous I/O

  • Low barrier to entry for a painless integration

  • Supports for code completion using type hinting

  • Actively maintained by his author and contributors

  • Use of streaming data structure in place of expensive lists

Getting started

What does it look like? Here is an example of a simple task:

import asyncio
from zrq import task

@task
async def say_after(delay: int, what: str):
   await asyncio.sleep(delay)
   print(what)

Decorating say_after function with @task makes it delayable. Now what?

# Delay the function execution by enqueuing it
>>> job = await say_after.enqueue(3, "hello world")
>>> job.state
State.QUEUED

# Awaiting the function as usual are still doable
>>> await say_after(3, "hello world")  # three seconds later...
'hello world'

That’s it! The task has been delayed. Follow the Quickstart if you are eager to start.

User Guide

API Reference

Concepts & Architecture

Contributor Guide