{"id":51862746,"url":"https://github.com/cofin/litestar-queues","last_synced_at":"2026-07-24T10:30:24.084Z","repository":{"id":368322805,"uuid":"1231220564","full_name":"cofin/litestar-queues","owner":"cofin","description":"Task queues, workers, schedules, and backend integrations for Litestar","archived":false,"fork":false,"pushed_at":"2026-07-20T18:04:16.000Z","size":1109,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-20T19:07:07.508Z","etag":null,"topics":["advanced-alchemy","asyncio","background-jobs","cloud-run","litestar","python","queues","redis","scheduled-tasks","sqlalchemy","sqlspec","task-queue","valkey","workers"],"latest_commit_sha":null,"homepage":"https://cofin.github.io/litestar-queues/","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/cofin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing/documentation.rst","funding":null,"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}},"created_at":"2026-05-06T18:47:49.000Z","updated_at":"2026-07-20T18:05:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"91a4e875-9cfe-49bc-b87e-124c98e5526f","html_url":"https://github.com/cofin/litestar-queues","commit_stats":null,"previous_names":["cofin/litestar-queues"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cofin/litestar-queues","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofin%2Flitestar-queues","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofin%2Flitestar-queues/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofin%2Flitestar-queues/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofin%2Flitestar-queues/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cofin","download_url":"https://codeload.github.com/cofin/litestar-queues/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofin%2Flitestar-queues/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35839500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-24T02:00:07.870Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["advanced-alchemy","asyncio","background-jobs","cloud-run","litestar","python","queues","redis","scheduled-tasks","sqlalchemy","sqlspec","task-queue","valkey","workers"],"created_at":"2026-07-24T10:30:21.837Z","updated_at":"2026-07-24T10:30:24.073Z","avatar_url":"https://github.com/cofin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Litestar Queues\n\n[![PyPI](https://img.shields.io/pypi/v/litestar-queues)](https://pypi.org/project/litestar-queues/)\n[![Python](https://img.shields.io/pypi/pyversions/litestar-queues)](https://pypi.org/project/litestar-queues/)\n[![License](https://img.shields.io/pypi/l/litestar-queues)](https://github.com/cofin/litestar-queues/blob/main/LICENSE)\n[![CI](https://github.com/cofin/litestar-queues/actions/workflows/ci.yml/badge.svg)](https://github.com/cofin/litestar-queues/actions/workflows/ci.yml)\n[![Docs](https://img.shields.io/badge/docs-cofin.github.io-blue)](https://cofin.github.io/litestar-queues/)\n\nLitestar Queues lets a Litestar application persist work, run it in a worker,\nand inspect the result. Use it for work that should outlive the request that\nstarted it: sending email, importing files, refreshing reports, or calling a\nslow service.\n\n## Quickstart\n\nInstall the package:\n\n```bash\npip install litestar-queues\n```\n\nCreate `app.py`:\n\n```python\nfrom litestar import Litestar, post\nfrom litestar.di import NamedDependency\n\nfrom litestar_queues import QueueConfig, QueuePlugin, QueueService, task\n\n\n@task(\"accounts.sync\", queue=\"accounts\", timeout=30)\nasync def sync_account(account_id: str) -\u003e dict[str, str]:\n    return {\"account_id\": account_id, \"status\": \"synced\"}\n\n\n@post(\"/accounts/{account_id:str}/sync\")\nasync def create_sync_job(\n    account_id: str,\n    queue_service: NamedDependency[QueueService],\n) -\u003e dict[str, str]:\n    result = await queue_service.enqueue(sync_account, account_id)\n    return {\"task_id\": str(result.id), \"status\": result.status or \"pending\"}\n\n\napp = Litestar(\n    route_handlers=[create_sync_job],\n    plugins=[QueuePlugin(config=QueueConfig())],\n)\n```\n\nRun the application:\n\n```bash\nLITESTAR_APP=app:app litestar run --reload\n```\n\nEnqueue a task:\n\n```bash\ncurl -X POST http://127.0.0.1:8000/accounts/acct-123/sync\n```\n\nThe response contains a task ID and an initial status. The default in-memory\nqueue and in-app worker are ideal for this first run.\n\n## Production boundary\n\nChoose where tasks are stored separately from where they run. The default\nmemory backend stores tasks in one Python process. If the web app and worker\nrun in separate processes, use a shared backend such as SQLSpec, Advanced\nAlchemy, Redis, or Valkey. Use standalone workers when the web app and task\nworkers must scale separately. Cloud Run runs tasks; it does not store them.\n\n## Next steps\n\n- [Start here](https://cofin.github.io/litestar-queues/getting_started/index.html)\n- [Understand the model](https://cofin.github.io/litestar-queues/usage/concepts.html)\n- [Follow a how-to guide](https://cofin.github.io/litestar-queues/usage/index.html)\n- [Choose backends](https://cofin.github.io/litestar-queues/usage/backends.html)\n- [Run an example](https://cofin.github.io/litestar-queues/examples/index.html)\n- [Browse the API reference](https://cofin.github.io/litestar-queues/reference/index.html)\n\nLitestar Queues supports Python 3.10 through 3.14 and is licensed under MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcofin%2Flitestar-queues","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcofin%2Flitestar-queues","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcofin%2Flitestar-queues/lists"}