.. https://docutils.sourceforge.io/docs/user/rst/quickref.html Welcome to ZeroRQ ================= Release v\ |version|. (:ref:`Installation Guide `) .. image:: https://img.shields.io/badge/async-yes-green.svg :target: https://pypi.org/project/zrq/ :alt: AsyncIO Support Badge .. image:: https://img.shields.io/badge/codestyle-black-black.svg :target: https://pypi.org/project/zrq/ :alt: Codestyle Support Badge .. image:: https://img.shields.io/badge/license-BSD--3--Clause-blue.svg :target: https://pypi.org/project/zrq/ :alt: License Badge .. image:: https://img.shields.io/badge/python-3.10_%7C_3.11_%7C_3.12-blue.svg :target: https://pypi.org/project/zrq/ :alt: Python Version Support Badge .. image:: https://img.shields.io/badge/typing-strict-orange.svg :target: https://pypi.org/project/zrq/ :alt: Typing Support Badge .. image:: https://img.shields.io/badge/wheel-yes-green.svg :target: https://pypi.org/project/zrq/ :alt: 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 Z\ *ero* R\ *edis* Q\ *ueue*. 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 :ref:`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: .. code-block:: python import asyncio from zrq import task @task async def say_after(delay: int, what: str): await asyncio.sleep(delay) print(what) Decorating :func:`say_after` function with :func:`@task ` makes it delayable. Now what? .. code-block:: python # 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 :ref:`Quickstart` if you are eager to start. .. toctree:: :maxdepth: 2 :caption: Contents: User Guide ---------- .. toctree:: :maxdepth: 2 user API Reference ------------- .. toctree:: :maxdepth: 2 api Concepts & Architecture ----------------------- .. toctree:: :maxdepth: 3 design Contributor Guide ----------------- .. toctree:: :maxdepth: 2 contributor .. Indices and tables .. ================== .. .. * :ref:`genindex` .. * :ref:`modindex` .. * :ref:`search`