Skip to main content

AsyncMQ

AsyncMQ Logo

⚡ Supercharge your async applications with tasks so fast, you'll think you're bending time itself. ⚡

Test Suite Package version Supported Python versions


Documentation: https://asyncmq.dymmond.com 📚

Source Code: https://github.com/dymmond/asyncmq

The official supported version is always the latest released.


AsyncMQ is an asynchronous Python job queue focused on asyncio/anyio workloads.

It gives you:

  • task registration via @task
  • queue and worker runtime APIs
  • delayed jobs, retries/backoff, TTL expiration, and dead-letter routing
  • multiple backends (Redis, Postgres, MongoDB, RabbitMQ, in-memory)
  • a CLI (asyncmq) and a built-in dashboard app

What AsyncMQ Is (and Is Not)

AsyncMQ is:

  • a library-first queue/worker runtime you embed in Python apps
  • backend-pluggable through a shared BaseBackend contract
  • suitable for both local development and production deployments

AsyncMQ is not:

  • a hosted queue service
  • a guaranteed exactly-once execution system
  • a replacement for domain-level idempotency in your task code

Architecture Overview

At runtime, AsyncMQ has four main layers:

  1. Task registration: @task(queue=...) stores handlers in TASK_REGISTRY and adds .enqueue() helpers.
  2. Queue API: Queue wraps backend operations (enqueue, pause, list_jobs, delayed/repeatable APIs).
  3. Worker runtime: process_job/handle_job run tasks, manage state transitions, retries, and acknowledgements.
  4. Backend and store: concrete backends persist job state and queue metadata.

For an end-to-end walkthrough, start with Core Concepts.

Feature Map

Minimal Quickstart (In-Memory)

Use in-memory backend first so you can run without Redis/Postgres.

# myapp/settings.py
from asyncmq.backends.memory import InMemoryBackend
from asyncmq.conf.global_settings import Settings


class AppSettings(Settings):
    backend = InMemoryBackend()
export ASYNCMQ_SETTINGS_MODULE=myapp.settings.AppSettings
# myapp/tasks.py
from asyncmq.tasks import task


@task(queue="emails", retries=2, ttl=300)
async def send_welcome(email: str) -> None:
    print(f"sent welcome email to {email}")
# producer.py
import anyio
from asyncmq.queues import Queue
from myapp.tasks import send_welcome


async def main() -> None:
    queue = Queue("emails")
    job_id = await send_welcome.enqueue("alice@example.com", backend=queue.backend)
    print("enqueued", job_id)


anyio.run(main)
asyncmq worker start emails --concurrency 1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asyncmq-0.8.1.tar.gz (176.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asyncmq-0.8.1-py3-none-any.whl (231.1 kB view details)

Uploaded Python 3

File details

Details for the file asyncmq-0.8.1.tar.gz.

File metadata

  • Download URL: asyncmq-0.8.1.tar.gz
  • Upload date:
  • Size: 176.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":true,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Ubuntu","version":"24.04"},"implementation":{"name":"CPython","version":"3.10.20"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.0.13 30 Jan 2024","python":"3.10.20","system":{"name":"Linux","release":"6.17.0-1018-azure"}} HTTPX2/2.5.0

File hashes

Hashes for asyncmq-0.8.1.tar.gz
Algorithm Hash digest
SHA256 939b5b02aa041289452c4c78c6eaf15752f8fdc8cc19f2392e36c7016da6532a
MD5 e0c76506fcd9c78c233766ef52f4fd63
BLAKE2b-256 4930bebc3b0321fcd4a4ac6f2e709a17edd4c0630f5904619a6add0a3d1cfaeb

See more details on using hashes here.

File details

Details for the file asyncmq-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: asyncmq-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 231.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":true,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Ubuntu","version":"24.04"},"implementation":{"name":"CPython","version":"3.10.20"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.0.13 30 Jan 2024","python":"3.10.20","system":{"name":"Linux","release":"6.17.0-1018-azure"}} HTTPX2/2.5.0

File hashes

Hashes for asyncmq-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27d8ce7b0a6fca349df1d5b279dfc7411ec909354d4c0099f98043ed128ff579
MD5 b39375179a720e19b4fe43cd5ee3310d
BLAKE2b-256 380df93d5fac0721011eb59354accb353624b7e32cd14b348b99c9e6660b8e2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page