{"id":13501190,"url":"https://github.com/taskiq-python/taskiq","last_synced_at":"2025-05-13T19:18:31.604Z","repository":{"id":49800155,"uuid":"514860374","full_name":"taskiq-python/taskiq","owner":"taskiq-python","description":"Distributed task queue with full async support","archived":false,"fork":false,"pushed_at":"2025-05-07T06:17:17.000Z","size":1581,"stargazers_count":1281,"open_issues_count":80,"forks_count":76,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-07T07:29:29.060Z","etag":null,"topics":["asyncio","celery-like","hacktoberfest","python","python3","task-executor","task-manager"],"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/taskiq-python.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},"funding":{"github":"taskiq-python","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-07-17T14:05:07.000Z","updated_at":"2025-05-05T21:46:57.000Z","dependencies_parsed_at":"2024-03-18T23:44:18.865Z","dependency_job_id":"a2a7a2d8-e06d-49e7-8d52-0d69d52c12f5","html_url":"https://github.com/taskiq-python/taskiq","commit_stats":{"total_commits":266,"total_committers":30,"mean_commits":8.866666666666667,"dds":"0.16917293233082709","last_synced_commit":"41fbc7bac04ad0b1a5ba63e06b90ec653c7af682"},"previous_names":[],"tags_count":71,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskiq-python%2Ftaskiq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskiq-python%2Ftaskiq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskiq-python%2Ftaskiq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taskiq-python%2Ftaskiq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taskiq-python","download_url":"https://codeload.github.com/taskiq-python/taskiq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253878976,"owners_count":21977903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["asyncio","celery-like","hacktoberfest","python","python3","task-executor","task-manager"],"created_at":"2024-07-31T22:01:28.663Z","updated_at":"2025-05-13T19:18:31.560Z","avatar_url":"https://github.com/taskiq-python.png","language":"Python","funding_links":["https://github.com/sponsors/taskiq-python"],"categories":["Python","Projects"],"sub_categories":["Task Queues"],"readme":"[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/taskiq?style=for-the-badge)](https://pypi.org/project/taskiq/)\n[![PyPI](https://img.shields.io/pypi/v/taskiq?style=for-the-badge)](https://pypi.org/project/taskiq/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/taskiq?style=for-the-badge)](https://pypistats.org/packages/taskiq)\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://taskiq-python.github.io/\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/taskiq-python/taskiq/master/imgs/logo.svg\" width=600\u003e\u003c/a\u003e\n\u003chr/\u003e\n\u003c/div\u003e\n\nDocumentation: https://taskiq-python.github.io/\n\n## What is taskiq?\n\nTaskiq is an asynchronous distributed task queue for python.\nThis project takes inspiration from big projects such as [Celery](https://docs.celeryq.dev) and [Dramatiq](https://dramatiq.io/).\nBut taskiq can send and run both the sync and async functions, has\nintegration with popular async frameworks, such as [FastAPI](https://fastapi.tiangolo.com/) and [AioHTTP](https://docs.aiohttp.org/en/stable/).\n\nAlso, we use [PEP-612](https://peps.python.org/pep-0612/) to provide the best autosuggestions possible. All code is type-hinted.\n\n# Installation\n\nThis project can be installed using pip:\n```bash\npip install taskiq\n```\n\nOr it can be installed directly from git:\n\n```bash\npip install git+https://github.com/taskiq-python/taskiq\n```\n\n# Usage\n\nAt first you need to create a broker. Broker is an object that can communicate to workers using distributed queues.\n\nWe have different brokers for different queue backends. For example, we have a broker for [NATS](https://github.com/taskiq-python/taskiq-nats), [Redis](https://github.com/taskiq-python/taskiq-redis), [RabbitMQ](https://github.com/taskiq-python/taskiq-aio-pika), [Kafka](https://github.com/taskiq-python/taskiq-aio-kafka) and even more. Choose the one that fits you and create an instance.\n\n```python\nfrom taskiq_nats import JetStreamBroker\n\nbroker = JetStreamBroker(\"nats://localhost:4222\", queue=\"my_queue\")\n```\n\nDeclaring tasks is as easy as declaring a function. Just add a decorator to your function and you are ready to go.\n\n```python\nimport asyncio\n\nfrom taskiq_nats import JetStreamBroker\n\nbroker = JetStreamBroker(\"nats://localhost:4222\", queue=\"my_queue2\")\n\n\n@broker.task\nasync def my_task(a: int, b: int) -\u003e None:\n    print(\"AB\", a + b)\n\n\nasync def main():\n    await broker.startup()\n\n    await my_task.kiq(1, 2)\n\n    await broker.shutdown()\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n\n\n```\n\nThe message is going to be sent to the broker and then to the worker. The worker will execute the function. To start worker processes, just run the following command:\n\n```bash\ntaskiq worker path.to.the.module:broker\n```\n\nWhere `path.to.the.module` is the path to the module where the broker is defined and `broker` is the name of the broker variable.\n\nIf you have tasks in different modules, you can ask taskiq to automatically import them by passing the `--fs-discover` flag:\n\n```bash\ntaskiq worker path.to.the.module:broker --fs-discover\n```\n\nIt will import all modules called `tasks.py` in the current directory and all subdirectories.\n\nAlso, we support hot reload for workers. To enable it, just pass the `--reload` flag. It will reload the worker when the code changes (To use it, install taskiq with reload extra. E.g `pip install taskiq[reload]`).\n\n\nAlso, we have cool integrations with popular async frameworks. For example, we have an integration with [FastAPI](https://taskiq-python.github.io/framework_integrations/taskiq-with-fastapi.html) or [AioHTTP](https://taskiq-python.github.io/framework_integrations/taskiq-with-aiohttp.html). You can use it to reuse dependencies from your web app in your tasks.\n\nRead about all features in our documentation: https://taskiq-python.github.io/\n\n# Local development\n\n\n## Linting\n\nWe use pre-commit to do linting locally.\n\nAfter cloning this project, please install [pre-commit](https://pre-commit.com/#install). It helps fix files before committing changes.\n\n```bash\npre-commit install\n```\n\n\n## Testing\n\nPytest can run without any additional actions or options.\n\n```bash\npytest\n```\n\n## Docs\n\nTo run docs locally, you need to install [yarn](https://yarnpkg.com/getting-started/install).\n\nFirst, you need to install dependencies.\n```\nyarn install\n```\n\nAfter that you can set up a docs server by running:\n\n```\nyarn docs:dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskiq-python%2Ftaskiq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaskiq-python%2Ftaskiq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaskiq-python%2Ftaskiq/lists"}