{"id":13501347,"url":"https://github.com/procrastinate-org/procrastinate","last_synced_at":"2025-04-10T11:30:12.131Z","repository":{"id":37943115,"uuid":"170681179","full_name":"procrastinate-org/procrastinate","owner":"procrastinate-org","description":"PostgreSQL-based Task Queue for Python","archived":false,"fork":false,"pushed_at":"2025-04-09T14:09:40.000Z","size":20070,"stargazers_count":967,"open_issues_count":49,"forks_count":68,"subscribers_count":36,"default_branch":"main","last_synced_at":"2025-04-09T15:22:48.805Z","etag":null,"topics":["async","postgresql","python","sync","task-queue"],"latest_commit_sha":null,"homepage":"https://procrastinate.readthedocs.io/","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/procrastinate-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["procrastinate-org"]}},"created_at":"2019-02-14T11:30:10.000Z","updated_at":"2025-04-09T14:07:06.000Z","dependencies_parsed_at":"2024-04-06T01:28:37.932Z","dependency_job_id":"f5aae65c-f976-4d56-b6ee-0983c1c82ec1","html_url":"https://github.com/procrastinate-org/procrastinate","commit_stats":{"total_commits":1900,"total_committers":55,"mean_commits":34.54545454545455,"dds":0.7252631578947368,"last_synced_commit":"ea37f88e79c4a9256909bf44c742601d6cb5b0a8"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/procrastinate-org%2Fprocrastinate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/procrastinate-org%2Fprocrastinate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/procrastinate-org%2Fprocrastinate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/procrastinate-org%2Fprocrastinate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/procrastinate-org","download_url":"https://codeload.github.com/procrastinate-org/procrastinate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248056831,"owners_count":21040455,"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":["async","postgresql","python","sync","task-queue"],"created_at":"2024-07-31T22:01:34.091Z","updated_at":"2025-04-10T11:30:11.646Z","avatar_url":"https://github.com/procrastinate-org.png","language":"Python","readme":"# Procrastinate: PostgreSQL-based Task Queue for Python\n\n[![Deployed to PyPI](https://img.shields.io/pypi/v/procrastinate?logo=pypi\u0026logoColor=white)](https://pypi.org/pypi/procrastinate)\n[![Deployed to PyPI](https://img.shields.io/pypi/pyversions/procrastinate?logo=pypi\u0026logoColor=white)](https://pypi.org/pypi/procrastinate)\n[![GitHub Repository](https://img.shields.io/github/stars/procrastinate-org/procrastinate?style=flat\u0026logo=github\u0026color=brightgreen)](https://github.com/procrastinate-org/procrastinate/)\n[![Continuous Integration](https://img.shields.io/github/actions/workflow/status/procrastinate-org/procrastinate/ci.yml?logo=github\u0026branch=main)](https://github.com/procrastinate-org/procrastinate/actions?workflow=CI)\n[![Documentation](https://img.shields.io/readthedocs/procrastinate/stable?logo=read-the-docs\u0026logoColor=white)](https://procrastinate.readthedocs.io/en/stable/badge=stable)\n[![Coverage badge](https://raw.githubusercontent.com/procrastinate-org/procrastinate/python-coverage-comment-action-data/badge.svg)](https://htmlpreview.github.io/?https://github.com/procrastinate-org/procrastinate/blob/python-coverage-comment-action-data/htmlcov/index.html)\n[![MIT License](https://img.shields.io/github/license/procrastinate-org/procrastinate?logo=open-source-initiative\u0026logoColor=white)](https://github.com/procrastinate-org/procrastinate/blob/main/LICENSE)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](https://github.com/procrastinate-org/procrastinate/blob/main/CODE_OF_CONDUCT.md)\n[![Discord](https://img.shields.io/discord/1197292025725329549?logo=discord\u0026logoColor=white\u0026label=Discord\u0026color=%237289da)](https://discord.gg/JWZeNq6P6Z)\n\n**Procrastinate is looking for** [additional maintainers!](https://github.com/procrastinate-org/procrastinate/discussions/748)\n\nProcrastinate is an open-source Python 3.9+ distributed task processing\nlibrary, leveraging PostgreSQL 13+ to store task definitions, manage locks and\ndispatch tasks. It can be used within both sync and async code,\nhas [Django](howto/django/configuration) integration, and is easy to use with ASGI frameworks.\nIt supports periodic tasks, retries, arbitrary task locks etc.\n\nIn other words, from your main code, you call specific functions (tasks) in a\nspecial way and instead of being run on the spot, they're scheduled to\nbe run elsewhere, now or in the future.\n\nHere's an example (if you want to run the code yourself, head to [Quickstart]):\n\n```python\n# mycode.py\nimport procrastinate\n\n# Make an app in your code\napp = procrastinate.App(connector=procrastinate.SyncPsycopgConnector())\n\n# Then define tasks\n@app.task(queue=\"sums\")\ndef sum(a, b):\n    with open(\"myfile\", \"w\") as f:\n        f.write(str(a + b))\n\nwith app.open():\n    # Launch a job\n    sum.defer(a=3, b=5)\n\n# Somewhere in your program, run a worker (actually, it's usually a\n# different program than the one deferring jobs for execution)\napp.run_worker(queues=[\"sums\"])\n```\n\nThe worker will run the job, which will create a text file\nnamed `myfile` with the result of the sum `3 + 5` (that's `8`).\n\nSimilarly, from the command line:\n\n```bash\nexport PROCRASTINATE_APP=\"mycode.app\"\n\n# Launch a job\nprocrastinate defer mycode.sum '{\"a\": 3, \"b\": 5}'\n\n# Run a worker\nprocrastinate worker -q sums\n```\n\nLastly, you can use Procrastinate asynchronously too (actually, it's the\nrecommended way to use it):\n\n```python\nimport asyncio\n\nimport procrastinate\n\n# Make an app in your code\napp = procrastinate.App(connector=procrastinate.PsycopgConnector())\n\n# Define tasks using coroutine functions\n@app.task(queue=\"sums\")\nasync def sum(a, b):\n    await asyncio.sleep(a + b)\n\nasync with app.open_async():\n    # Launch a job\n    await sum.defer_async(a=3, b=5)\n\n    # Somewhere in your program, run a worker (actually, it's often a\n    # different program than the one deferring jobs for execution)\n    await app.run_worker_async(queues=[\"sums\"])\n```\n\nThere are quite a few interesting features that Procrastinate adds to the mix.\nYou can head to the Quickstart section for a general tour or\nto the How-To sections for specific features. The Discussion\nsection should hopefully answer your questions. Otherwise,\nfeel free to open an [issue](https://github.com/procrastinate-org/procrastinate/issues).\n\n_Note to my future self: add a quick note here on why this project is named_\n\"[Procrastinate]\" ;) .\n\n\u003c!--Below this line is content that will appear in the GitHub Readme but not in the\nSphinx doc: end-of-index-doc --\u003e\n\n## Where to go from here\n\nThe complete [docs] is probably the best place to learn about the project.\n\nIf you encounter a bug, or want to get in touch, you're always welcome to open a\n[ticket].\n\n[docs]: https://procrastinate.readthedocs.io/\n[procrastinate]: https://en.wikipedia.org/wiki/Procrastination\n[quickstart]: https://procrastinate.readthedocs.io/en/stable/quickstart.html\n[ticket]: https://github.com/procrastinate-org/procrastinate/issues/new\n","funding_links":["https://github.com/sponsors/procrastinate-org"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprocrastinate-org%2Fprocrastinate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprocrastinate-org%2Fprocrastinate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprocrastinate-org%2Fprocrastinate/lists"}