{"id":28089552,"url":"https://github.com/dymmond/asyncmq","last_synced_at":"2026-01-25T18:02:54.519Z","repository":{"id":291125114,"uuid":"972577303","full_name":"dymmond/asyncmq","owner":"dymmond","description":"Supercharge your async applications with tasks so fast, you’ll think you’re bending time itself.","archived":false,"fork":false,"pushed_at":"2025-11-15T13:03:27.000Z","size":949,"stargazers_count":77,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-12-26T16:18:05.626Z","etag":null,"topics":["anyio","asyncio","background-jobs","celery-alternative","concurrency","dead-letter-queue","esmerald","fastapi","job-scheduler","message-queue","microservices","mongodb","paralelism","postgres","postgresql","python","rate-limiter","redis","retry-policy","task-queue"],"latest_commit_sha":null,"homepage":"https://asyncmq.dymmond.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dymmond.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["tarsil"]}},"created_at":"2025-04-25T09:57:52.000Z","updated_at":"2025-12-13T09:10:07.000Z","dependencies_parsed_at":"2025-05-02T15:41:27.931Z","dependency_job_id":"b46ca428-1709-4df6-8dc5-723cd00af9a0","html_url":"https://github.com/dymmond/asyncmq","commit_stats":null,"previous_names":["dymmond/asyncmq"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/dymmond/asyncmq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymmond%2Fasyncmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymmond%2Fasyncmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymmond%2Fasyncmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymmond%2Fasyncmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dymmond","download_url":"https://codeload.github.com/dymmond/asyncmq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymmond%2Fasyncmq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28756432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anyio","asyncio","background-jobs","celery-alternative","concurrency","dead-letter-queue","esmerald","fastapi","job-scheduler","message-queue","microservices","mongodb","paralelism","postgres","postgresql","python","rate-limiter","redis","retry-policy","task-queue"],"created_at":"2025-05-13T13:00:18.856Z","updated_at":"2026-01-25T18:02:54.511Z","avatar_url":"https://github.com/dymmond.png","language":"Python","funding_links":["https://github.com/sponsors/tarsil"],"categories":[],"sub_categories":[],"readme":"# AsyncMQ\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://asyncmq.dymmond.com\"\u003e\u003cimg src=\"https://res.cloudinary.com/dymmond/image/upload/v1746002620/asyncmq/oq2qhgqdlra7rudxaqhl.png\" alt=\"AsyncMQ Logo\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cspan\u003e⚡ Supercharge your async applications with tasks so fast, you'll think you're bending time itself. ⚡\u003c/span\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/dymmond/asyncmq/actions/workflows/test-suite.yml/badge.svg?event=push\u0026branch=main\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/dymmond/asyncmq/actions/workflows/test-suite.yml/badge.svg?event=push\u0026branch=main\" alt=\"Test Suite\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/asyncmq\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/asyncmq?color=%2334D058\u0026label=pypi%20package\" alt=\"Package version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://img.shields.io/pypi/pyversions/asyncmq.svg?color=%2334D058\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/pyversions/asyncmq.svg?color=%2334D058\" alt=\"Supported Python versions\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nWelcome to **AsyncMQ**, the modern task queue that brings **powerful**, **flexible**, and **lightning-fast** background processing to your Python stack. Whether you're building microservices, handling high-throughput data pipelines, or just want reliable delayed jobs, AsyncMQ has your back.\n\n## 🚀 Why Choose AsyncMQ?\n\n1. **Asyncio \u0026 AnyIO-Native**\n   No more wrestling with threads or callbacks—AsyncMQ is built on `asyncio` and `anyio`, so your tasks are non-blocking and integrate seamlessly into modern async frameworks like FastAPI and Esmerald.\n\n2. **Multi-Backend Flexibility**\n   From the blistering speed of Redis to the ACID guarantees of Postgres, or the schema-less power of MongoDB, AsyncMQ supports multiple backends out of the box—and you can write your own by implementing `BaseBackend`.\n\n3. **Advanced Scheduling**\n\n   * **Delayed Jobs**: Fire off tasks in the future with precise delays.\n   * **Repeatable \u0026 Cron**: Create heartbeat jobs or cron-like schedules with a single line.\n   * **Scan \u0026 Scheduler**: Smart polling intervals and cron logic keep your timings accurate without burning CPU cycles.\n\n4. **Robust Error Handling**\n\n   * **Retries \u0026 Backoff**: Exponential or custom backoff strategies to gracefully handle failures.\n   * **Dead Letter Queue (DLQ)**: Automatically route permanently failed tasks for later inspection and reprocessing.\n\n5. **Observability \u0026 Event Hooks**\n   Tap into lifecycle events (`job:started`, `job:completed`, `job:failed`, `job:progress`) to power real-time dashboards, metrics, or custom alerts.\n\n6. **Rate Limiting \u0026 Concurrency Control**\n   Fine-tune throughput with token-bucket rate limiting and capacity limiters. Scale your worker concurrency without overloading downstream systems.\n\n7. **Sandboxed Execution**\n   Run untrusted or CPU-bound tasks in isolated subprocesses with timeouts to protect your main workers from rogue code or infinite loops.\n\n8. **Flow/DAG Orchestration**\n   Create complex task graphs with dependencies using `FlowProducer`. Enqueue entire pipelines atomically or fall back to safe sequential logic.\n\n9. **CLI \u0026 Dev Experience**\n   A feature-rich CLI for managing queues, jobs, and workers—intuitive commands, JSON output support, and built-in help for every scenario.\n\n10. **Seamless ASGI Integration**\n    Out-of-the-box compatibility with FastAPI, Esmerald, or any ASGI application. Manage workers within your app's lifecycle events.\n\n---\n\n## Installation\n\nAsyncMQ requires Python 3.10+ to run and that its because the EOL will be later on only.\n\nYou can install in many different ways, the default brings `redis` to use with `RedisBackend`.\n\n```shell\n$ pip install asyncmq\n```\n\n**Postgres**\n\nIf you prefer the Postgres backend.\n\n```shell\n$ pip install asyncmq[postgres]\n```\n\n**Mongo DB**\n\nYou might want also Mongo DB backend.\n\n```shell\n$ pip install asyncmq[mongo]\n```\n\n**All in one go**\n\nYou might want to install everything and see what is the best for you.\n\n```shell\n$ pip install asyncmq[all]\n```\n\n### Dashboard\n\nAsyncMQ comes with a dashboard and that requires some additional setup but nothing special but to install it.\n\n---\n\n## Comparison with Other Python Task Queues\n\n| Feature                    | **AsyncMQ**                      | Celery          | RQ         | Dramatiq     | Huey       |\n| -------------------------- | -------------------------------- |-----------------| ---------- | ------------ | ---------- |\n| **AsyncIO Native**         | ✅                                | ❌               | ❌          | ✅            | ❌          |\n| **Pluggable Backends**     | ✅ Redis, Postgres, Mongo, In-Mem | RabbitMQ/others | Redis only | Redis only   | Redis only |\n| **Rate Limiting**          | ✅ built-in                       | ❌               | ❌          | ✅ via addon  | ❌          |\n| **Cron \u0026 Repeatable Jobs** | ✅ interval \u0026 cron expressions    | ✅               | ✅          | ✅            | ✅          |\n| **Progress Reporting**     | ✅ event hooks                    | ✅ callbacks     | ❌          | ✅ hooks      | ❌          |\n| **Dead Letter Queue**      | ✅                                | ✅               | ❌          | ✅            | ✅          |\n| **Flow / DAG Support**     | ✅ `FlowProducer`                 | ✅ chords        | ❌          | ✅ extensions | ❌          |\n| **ASGI-Friendly**          | ✅ FastAPI/Esmerald integration   | ❌               | ❌          | ❌            | ❌          |\n| **CLI Management**         | ✅ rich, JSON-friendly            | ✅               | ✅          | ✅            | ✅          |\n\n---\n\n### Where **AsyncMQ** Shines\n\n* **True AsyncIO \u0026 AnyIO integration**: zero thread hacks, full non-blocking background tasks.\n* **Backend flexibility**: swap Redis, Postgres, MongoDB, or In-Memory with a single setting.\n* **Built-in rate limiting \u0026 concurrency control**: protect downstream services out-of-the-box.\n* **Event-driven hooks**: subscribe to `job:started`, `completed`, `failed`, `progress`, etc., for metrics and alerts.\n* **ASGI integration**: manage workers within FastAPI or Esmerald lifecycles—no extra wrappers needed.\n\n---\n\n## ⚡ Core Features at a Glance\n\n| Category               | Highlights                                                                                |\n| ---------------------- | ----------------------------------------------------------------------------------------- |\n| **Task Definition**    | `@task` decorator, `.enqueue()`, progress callbacks, TTL, retries, dependencies, repeats  |\n| **Queue API**          | `add()`, `add_bulk()`, `add_repeatable()`, `pause()`, `resume()`, `clean()`, stats        |\n| **Worker Engine**      | `process_job()`, capacity \u0026 rate limiters, sandbox, event emitter, DLQ handling           |\n| **Scheduling**         | `delayed_job_scanner`, `repeatable_scheduler`, cron vs interval support                   |\n| **Flow Orchestration** | `FlowProducer.add_flow()`, atomic backend support, fallback mode for dependency wiring    |\n| **Configuration**      | Central `Settings` dataclass, env var override, dynamic tuning of concurrency \u0026 intervals |\n| **Observability**      | LoggingConfig protocol, structured logs, event subscriptions, metrics integration         |\n| **CLI Management**     | `asyncmq queue`, `asyncmq job`, `asyncmq worker`, `asyncmq info` commands                 |\n\n---\n\n## 🎬 Quickstart\n\n1. **Install**\n\n   ```bash\n   pip install asyncmq\n   ```\n2. **Configure**\n\n   Override the default settings `from asyncmq import monkay` and create your own, then make it global.\n\n   ```bash\n   export ASYNCMQ_SETTINGS_MODULE=myapp.settings.Settings\n   ```\n3. **Define a Task**\n\n   ```python\n   from asyncmq.tasks import task\n\n   @task(queue=\"emails\", retries=2, ttl=120)\n   async def send_welcome(email: str):\n       # Imagine real email-sending logic here\n       print(f\"📧 Sent welcome to {email}\")\n   ```\n4. **Enqueue \u0026 Run**\n\n   ```python\n   import anyio\n   from asyncmq.queues import Queue\n\n   async def main():\n       q = Queue(\"emails\")\n       await send_welcome.enqueue(q.backend, \"alice@example.com\", delay=10)\n   anyio.run(main)\n   ```\n5. **Start Workers**\n\n   ```bash\n   asyncmq worker start emails --concurrency 5\n   ```\n\n---\n\nAsyncMQ is more than just a task queue, it's the swiss army knife of async background processing.\nDive into the **Learn** section to master every feature, or jump into the **Features** docs for quick reference.\n\nReady to bend time?\n\n**Get started today** and experience async tasking at warp speed! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdymmond%2Fasyncmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdymmond%2Fasyncmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdymmond%2Fasyncmq/lists"}