{"id":34086858,"url":"https://github.com/adamrefaey/asynctasq","last_synced_at":"2026-01-17T05:03:49.301Z","repository":{"id":326353057,"uuid":"1099352207","full_name":"adamrefaey/asynctasq","owner":"adamrefaey","description":"A modern, async-first, type-safe task queue for Python. Built with asyncio, featuring 5 queue backends (Redis, PostgreSQL, MySQL, RabbitMQ, AWS SQS), automatic ORM serialization, and enterprise-grade reliability.","archived":false,"fork":false,"pushed_at":"2026-01-09T23:33:32.000Z","size":2205,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T16:57:31.829Z","etag":null,"topics":["async","aws-sqs","django","fastapi","msgpack","mysql","postgresql","python","queue","rabbitmq","redis","sqlalchemy","tortoise"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamrefaey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2025-11-18T22:14:20.000Z","updated_at":"2026-01-12T16:43:45.000Z","dependencies_parsed_at":"2025-12-01T12:08:28.351Z","dependency_job_id":null,"html_url":"https://github.com/adamrefaey/asynctasq","commit_stats":null,"previous_names":["adamrefaey/async-task","adamrefaey/q-task","adamrefaey/asynctasq"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/adamrefaey/asynctasq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamrefaey%2Fasynctasq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamrefaey%2Fasynctasq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamrefaey%2Fasynctasq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamrefaey%2Fasynctasq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamrefaey","download_url":"https://codeload.github.com/adamrefaey/asynctasq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamrefaey%2Fasynctasq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28399539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"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":["async","aws-sqs","django","fastapi","msgpack","mysql","postgresql","python","queue","rabbitmq","redis","sqlalchemy","tortoise"],"created_at":"2025-12-14T13:34:03.817Z","updated_at":"2026-01-17T05:03:49.287Z","avatar_url":"https://github.com/adamrefaey.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AsyncTasQ\n\n[![Tests](https://raw.githubusercontent.com/adamrefaey/asynctasq/main/.github/tests.svg)](https://github.com/adamrefaey/asynctasq/actions/workflows/ci.yml)\n[![Coverage](https://raw.githubusercontent.com/adamrefaey/asynctasq/main/.github/coverage.svg)](https://raw.githubusercontent.com/adamrefaey/asynctasq/main/.github/coverage.svg)\n[![Python Version](https://raw.githubusercontent.com/adamrefaey/asynctasq/main/.github/python-version.svg)](https://www.python.org/downloads/)\n[![PyPI Version](https://img.shields.io/pypi/v/asynctasq)](https://pypi.org/project/asynctasq/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA modern, async-first, type-safe task queue for Python. Built with asyncio, featuring 5 queue backends (Redis, PostgreSQL, MySQL, RabbitMQ, AWS SQS), automatic ORM serialization, and enterprise-grade reliability.\n\n## Table of Contents\n\n- [AsyncTasQ](#asynctasq)\n  - [Table of Contents](#table-of-contents)\n  - [Quick Start](#quick-start)\n  - [Documentation](#documentation)\n  - [Why AsyncTasQ?](#why-asynctasq)\n  - [Key Features](#key-features)\n  - [Comparison with Alternatives](#comparison-with-alternatives)\n  - [Contributing](#contributing)\n  - [Roadmap](#roadmap)\n  - [License \\\u0026 Support](#license--support)\n\n## Quick Start\n\n```bash\n# Install with your preferred driver\nuv add \"asynctasq[redis]\"\n\n# Configure environment\nasynctasq publish  # Generate .env.example template\ncp .env.example .env  # Edit with your settings\n```\n\n**Define and dispatch tasks:**\n\n```python\nfrom asynctasq import init, run, task\n\ninit()  # Loads from .env\n\n@task\nasync def send_email(to: str, subject: str):\n    print(f\"Sending to {to}: {subject}\")\n    return f\"Email sent to {to}\"\n\n# Dispatch tasks\nasync def main():\n    task_id = await send_email(to=\"user@example.com\", subject=\"Welcome!\").dispatch()\n    print(f\"Task dispatched: {task_id}\")\n\nif __name__ == \"__main__\":\n    run(main())\n```\n\n**Run workers:**\n\n```bash\nuv run asynctasq worker --queues default\n```\n\nSee the [full Quick Start guide](docs/examples/function-based-tasks.md) for complete examples with Redis setup, class-based tasks, and configuration chaining.\n\n## Documentation\n\n- **[Installation](docs/installation.md)** – Installation instructions\n- **[Configuration](docs/configuration.md)** – Complete configuration guide\n- **[Environment Variables](docs/environment-variables.md)** – .env file support and configuration\n- **[Task Definitions](docs/task-definitions.md)** – Function-based and class-based tasks\n- **[Queue Drivers](docs/queue-drivers.md)** – Redis, PostgreSQL, MySQL, RabbitMQ, AWS SQS\n- **[Running Workers](docs/running-workers.md)** – CLI and programmatic workers\n- **[Monitoring](docs/monitoring.md)** – Event streaming and queue statistics\n- **[ORM Integrations](docs/orm-integrations.md)** – SQLAlchemy, Django, Tortoise\n- **[Framework Integrations](docs/framework-integrations.md)** – FastAPI integration\n- **[CLI Reference](docs/cli-reference.md)** – Command reference\n- **[Best Practices](docs/best-practices.md)** – Production guidelines\n\n**Examples:**\n- [Function-Based Tasks](docs/examples/function-based-tasks.md)\n- [Class-Based Tasks](docs/examples/class-based-tasks.md)\n\n## Why AsyncTasQ?\n\n**True async-first architecture** – Built with asyncio from the ground up, not retrofitted onto sync foundations like Celery/RQ. Four execution modes (async I/O, sync I/O, async CPU, sync CPU) for optimal performance.\n\n**Intelligent serialization** – Automatic ORM model handling (SQLAlchemy, Django, Tortoise) with msgpack encoding reduces payloads by 90%+. Pass models directly as task arguments.\n\n**Enterprise reliability** – ACID guarantees (PostgreSQL/MySQL), dead-letter queues, crash recovery via visibility timeouts, graceful shutdown, and real-time event streaming.\n\n**Zero vendor lock-in** – 5 production backends (Redis, PostgreSQL, MySQL, RabbitMQ, AWS SQS) with identical API. Switch drivers with one config line.\n\n**Developer experience** – Type-safe and IDE support, elegant Laravel-inspired API, method chaining, beautiful Rich-formatted output, and first-class FastAPI integration.\n\n## Key Features\n\n- ✅ **Async-first** with native asyncio throughout\n- ✅ **5 queue backends**: Redis, PostgreSQL, MySQL, RabbitMQ, AWS SQS\n- ✅ **Type-safe** with full type hints and IDE support\n- ✅ **4 execution modes**: async I/O, sync I/O (threads), CPU-bound (processes)\n- ✅ **ORM integration**: Auto-serialization for SQLAlchemy, Django, Tortoise\n- ✅ **msgpack serialization**: 2-3x faster than JSON\n- ✅ **ACID guarantees** (PostgreSQL/MySQL)\n- ✅ **Dead-letter queues** for failed task inspection\n- ✅ **Environment \u0026 .env file support**\n- ✅ **FastAPI integration** with lifecycle management\n- ✅ **Real-time event streaming** via Redis Pub/Sub\n- ✅ **Beautiful console output** with Rich formatting\n- ✅ **Graceful shutdown** with signal handlers\n- ✅ **Configurable retries** with custom logic hooks\n\n## Comparison with Alternatives\n\nAsyncTasQ differentiates itself with **true async-first architecture**, **ORM auto-serialization**, **5 production backends** (Redis, PostgreSQL, MySQL, RabbitMQ, SQS), **ACID guarantees**, and **dead-letter queues**.\n\n| Feature                    | AsyncTasQ                         | Celery     | ARQ      | Dramatiq  | RQ       | Huey      |\n| -------------------------- | --------------------------------- | ---------- | -------- | --------- | -------- | --------- |\n| **Async**                  | ✅ Native                          | ❌ No       | ✅ Yes    | ⚠️ Limited | ❌ No     | ⚠️ Limited |\n| **Type Safety**            | ✅ Full type hints and IDE support | ⚠️ External | ✅ Yes    | ✅ Yes     | ✅ Yes    | ⚠️ Limited |\n| **Backends**               | 5                                 | 3          | 1        | 2         | 1        | 4         |\n| **ORM Auto-serialization** | ✅ Yes                             | ❌ No       | ❌ No     | ❌ No      | ❌ No     | ❌ No      |\n| **ACID**                   | ✅ Yes                             | ❌ No       | ❌ No     | ❌ No      | ❌ No     | ❌ No      |\n| **DLQ**                    | ✅ Built-in                        | ⚠️ Manual   | ❌ No     | ✅ Yes     | ❌ No     | ❌ No      |\n| **FastAPI**                | ✅ Native                          | ⚠️ Manual   | ⚠️ Manual | ⚠️ Manual  | ⚠️ Manual | ⚠️ Manual  |\n\n**Choose AsyncTasQ for:** Modern async apps (FastAPI, aiohttp), type-safe codebases, automatic ORM handling, enterprise ACID requirements, multi-backend flexibility.\n\n**Choose alternatives for:** Mature ecosystems with many plugins (Celery), cron scheduling (Huey, ARQ), simple sync applications (RQ), or existing large codebases.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for setup and development workflow:\n\n```bash\njust init        # One-line setup with deps and hooks\njust docker-up   # Start Redis, PostgreSQL, MySQL, RabbitMQ, LocalStack\njust test        # Run all tests (or just test-unit / just test-integration)\njust ci          # Full CI suite locally\n```\n\n## Roadmap\n\n- [ ] SQLite \u0026 Oracle drivers\n- [ ] Task chaining \u0026 workflows\n- [ ] Rate limiting \u0026 task priority\n- [ ] Scheduled/cron tasks\n\n## License \u0026 Support\n\nMIT License – see [LICENSE](LICENSE).\n\n**Links:** [Repository](https://github.com/adamrefaey/asynctasq) • [Issues](https://github.com/adamrefaey/asynctasq/issues) • [Discussions](https://github.com/adamrefaey/asynctasq/discussions)\n\nBuilt with ❤️ by [Adam Refaey](https://github.com/adamrefaey)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamrefaey%2Fasynctasq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamrefaey%2Fasynctasq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamrefaey%2Fasynctasq/lists"}