{"id":16949887,"url":"https://github.com/tailhook/aio-beanstalk","last_synced_at":"2025-09-02T02:34:23.832Z","repository":{"id":19269254,"uuid":"22505554","full_name":"tailhook/aio-beanstalk","owner":"tailhook","description":"The asyncio client for beanstalkd work queue","archived":false,"fork":false,"pushed_at":"2014-12-04T14:51:30.000Z","size":231,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-16T13:56:16.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tailhook.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-01T10:35:15.000Z","updated_at":"2019-11-30T20:22:55.000Z","dependencies_parsed_at":"2022-08-21T07:40:48.438Z","dependency_job_id":null,"html_url":"https://github.com/tailhook/aio-beanstalk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tailhook/aio-beanstalk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Faio-beanstalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Faio-beanstalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Faio-beanstalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Faio-beanstalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailhook","download_url":"https://codeload.github.com/tailhook/aio-beanstalk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Faio-beanstalk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273220492,"owners_count":25066395,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"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":[],"created_at":"2024-10-13T21:56:17.417Z","updated_at":"2025-09-02T02:34:23.800Z","avatar_url":"https://github.com/tailhook.png","language":"Python","readme":"=============\naio-beanstalk\n=============\n\naio-beanstalk is a asyncio client for beanstalk\n\nStatus: Low level protocol is fully implemented but not well tested.\nHigher-level interface is in prototype stage.\n\n\nLow-Level Interface\n-------------------\n\n\nBasically it looks like:\n\n.. code-block:: python\n\n   import asyncio\n   from aiobeanstalk.proto import Client\n\n   @asyncio.coroutine\n   def main():\n       client = yield from Client.connect('localhost', 11300)\n       yield from client.send_command('use', 'mytesttube')\n       res = yield from client.send_command('put',\n            100,  # priority\n            0,    # delay\n            10,   # TTR = time to run\n            body=b'task body')\n       if isinstance(res, Exception):\n           raise res\n       print(\"Job queued with id\", res.job_id)\n       client.close()\n\n   if __name__ == '__main__':\n       asyncio.get_event_loop().run_until_complete(main())\n\n\nThe low-level interface is intentionally has no methods for each command, and\ndoes not raise exceptions. Higher-level interface fill-in the gaps, and\nprovides usual consumer-producer abstractions (At low level both the process\nwhich sends the tasks and worker that processes them share same protocol. It's\nhow beanstalk is designed).\n\nClient methods:\n\n``connect(host, port)``\n    A classmethod coroutine that returns ``Client`` object that is connected\n    to beanstalkd server on the specified host and port.\n\n``send_command(cmd, *args, body=None)``\n    A coroutine that sends command to the beanstalkd server and waits for the\n    reply. You must not put length of the body in ``args`` as it will be\n    added automatially.\n\n    Reply is returned as object from ``aiobeanstalk.packets`` or\n    ``aiobeanstalk.exceptions``. Exceptions are returned rather than raised,\n    so you must always check result. But, ``EOFError`` may be *raised* in the\n    case connection is closed before receiving a reply.\n\n    It's *safe* to call it from many coroutines simultaneously, requests will\n    be pipelined. However, it's probably useless to call any command\n    simultaneously with ``reserve``, because the latter blocks on server.\n\n\n``close()``\n    Closes socket.\n\n\nHigh Level Interface\n====================\n\nTBD\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Faio-beanstalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftailhook%2Faio-beanstalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Faio-beanstalk/lists"}