{"id":20598338,"url":"https://github.com/kkirsche/aioutilities","last_synced_at":"2026-04-20T15:04:39.817Z","repository":{"id":56723035,"uuid":"524161656","full_name":"kkirsche/aioutilities","owner":"kkirsche","description":"asyncio-powered coroutine worker pool","archived":false,"fork":false,"pushed_at":"2022-08-12T21:20:11.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-22T01:47:44.336Z","etag":null,"topics":["asyncio","python","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/aioutilities/","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/kkirsche.png","metadata":{"files":{"readme":"README.md","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":"2022-08-12T16:50:52.000Z","updated_at":"2023-09-22T09:25:22.000Z","dependencies_parsed_at":"2022-08-16T00:20:40.794Z","dependency_job_id":null,"html_url":"https://github.com/kkirsche/aioutilities","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kkirsche/aioutilities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkirsche%2Faioutilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkirsche%2Faioutilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkirsche%2Faioutilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkirsche%2Faioutilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kkirsche","download_url":"https://codeload.github.com/kkirsche/aioutilities/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkirsche%2Faioutilities/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32052552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["asyncio","python","python3"],"created_at":"2024-11-16T08:26:23.085Z","updated_at":"2026-04-20T15:04:39.800Z","avatar_url":"https://github.com/kkirsche.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aioutilities\r\n\r\n`asyncio`-powered coroutine worker pool. No more juggling bounded semaphores and annoying timeouts, and allows you to run through millions of pieces of data efficiently.\r\n\r\n# Installation\r\n\r\n```shell\r\npython -m pip install -U aioutilities\r\n```\r\n\r\n# Credits\r\n\r\nThis is refactored and built on top of https://github.com/CaliDog/asyncpool\r\n\r\n# Example Usage\r\n\r\n```python\r\nfrom asyncio import Queue, ensure_future, run, sleep\r\n\r\nfrom aioutilities.pool import AioPool\r\n\r\n\r\nasync def example_coro(initial_number: int, result_queue: Queue[int]) -\u003e None:\r\n    result = initial_number * 2\r\n    print(f\"Processing Value! -\u003e {initial_number} * 2 = {result}\")\r\n    await sleep(1)\r\n    await result_queue.put(initial_number * 2)\r\n\r\n\r\nasync def result_reader(queue: Queue[int | None]) -\u003e None:\r\n    while True:\r\n        value = await queue.get()\r\n        if value is None:\r\n            break\r\n        print(f\"Got value! -\u003e {value}\")\r\n\r\n\r\nasync def example() -\u003e None:\r\n    result_queue = Queue[int | None]()\r\n    reader_future = ensure_future(result_reader(result_queue))\r\n\r\n    # Start a worker pool with 10 coroutines, invokes `example_coro` and waits for\r\n    # it to complete or 5 minutes to pass.\r\n    pool = AioPool[int](\r\n        name=\"ExamplePool\",\r\n        task=example_coro,\r\n        worker_qty=10,\r\n        timeout=300,\r\n    )\r\n    async with pool.spawn() as workers:\r\n        for i in range(50):\r\n            await workers.push(i, result_queue)\r\n\r\n    await result_queue.put(None)\r\n    await reader_future\r\n\r\n\r\ndef run_example() -\u003e None:\r\n    run(example())\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkirsche%2Faioutilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkkirsche%2Faioutilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkirsche%2Faioutilities/lists"}