{"id":13494382,"url":"https://github.com/omnilib/aiomultiprocess","last_synced_at":"2025-05-14T00:03:24.927Z","repository":{"id":39285700,"uuid":"128676320","full_name":"omnilib/aiomultiprocess","owner":"omnilib","description":"Take a modern Python codebase to the next level of performance.","archived":false,"fork":false,"pushed_at":"2024-08-20T15:43:49.000Z","size":196,"stargazers_count":1874,"open_issues_count":45,"forks_count":104,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-05-09T01:42:39.855Z","etag":null,"topics":["async","asyncio","hacktoberfest","multiprocessing","python","python3"],"latest_commit_sha":null,"homepage":"https://aiomultiprocess.omnilib.dev","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/omnilib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2018-04-08T19:49:41.000Z","updated_at":"2025-05-05T16:24:58.000Z","dependencies_parsed_at":"2023-12-27T22:42:59.850Z","dependency_job_id":"0df9fd18-fcad-4992-b75d-6b7a986d3ab0","html_url":"https://github.com/omnilib/aiomultiprocess","commit_stats":{"total_commits":180,"total_committers":11,"mean_commits":"16.363636363636363","dds":"0.37222222222222223","last_synced_commit":"a39331e4584482d39f7481cc13fb62dc4bedd9a2"},"previous_names":["jreese/aiomultiprocess"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnilib%2Faiomultiprocess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnilib%2Faiomultiprocess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnilib%2Faiomultiprocess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omnilib%2Faiomultiprocess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omnilib","download_url":"https://codeload.github.com/omnilib/aiomultiprocess/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043267,"owners_count":22004913,"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","asyncio","hacktoberfest","multiprocessing","python","python3"],"created_at":"2024-07-31T19:01:24.500Z","updated_at":"2025-05-14T00:03:24.877Z","avatar_url":"https://github.com/omnilib.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"aiomultiprocess\n===============\n\nTake a modern Python codebase to the next level of performance.\n\n[![version](https://img.shields.io/pypi/v/aiomultiprocess.svg)](https://pypi.org/project/aiomultiprocess)\n[![documentation](https://readthedocs.org/projects/aiosqlite/badge/?version=latest)](https://aiomultiprocess.omnilib.dev)\n[![changelog](https://img.shields.io/badge/change-log-blue)](https://aiomultiprocess.omnilib.dev/en/latest/changelog.html)\n[![license](https://img.shields.io/pypi/l/aiomultiprocess.svg)](https://github.com/omnilib/aiomultiprocess/blob/master/LICENSE)\n[![build status](https://github.com/omnilib/aiomultiprocess/workflows/Build/badge.svg)](https://github.com/omnilib/aiomultiprocess/actions)\n[![code coverage](https://img.shields.io/codecov/c/gh/omnilib/aiomultiprocess)](https://codecov.io/gh/omnilib/aiomultiprocess)\n[![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\nOn their own, AsyncIO and multiprocessing are useful, but limited:\nAsyncIO still can't exceed the speed of GIL, and multiprocessing only works on\none task at a time.  But together, they can fully realize their true potential.\n\naiomultiprocess presents a simple interface, while running a full AsyncIO event\nloop on each child process, enabling levels of concurrency never before seen\nin a Python application.  Each child process can execute multiple coroutines\nat once, limited only by the workload and number of cores available.\n\nGathering tens of thousands of network requests in seconds is as easy as:\n\n```python\nasync with Pool() as pool:\n    results = await pool.map(\u003ccoroutine function\u003e, \u003citems\u003e)\n```\n\nInstall\n-------\n\naiomultiprocess requires Python 3.6 or newer.\nYou can install it from PyPI:\n\n```bash\n$ pip3 install aiomultiprocess\n```\n\n\nUsage\n-----\n\nMost of aiomultiprocess mimics the standard multiprocessing module whenever\npossible, while accounting for places that benefit from async functionality.\n\nRunning your asynchronous jobs on a pool of worker processes is easy:\n\n```python\nimport asyncio\nfrom aiohttp import request\nfrom aiomultiprocess import Pool\n\nasync def get(url):\n    async with request(\"GET\", url) as response:\n        return await response.text(\"utf-8\")\n\nasync def main():\n    urls = [\"https://noswap.com\", ...]\n    async with Pool() as pool:\n        async for result in pool.map(get, urls):\n            ...  # process result\n            \nif __name__ == '__main__':\n    # Python 3.7\n    asyncio.run(main())\n    \n    # Python 3.6\n    # loop = asyncio.get_event_loop()\n    # loop.run_until_complete(main())\n```\n\nTake a look at the [User Guide][] for more details and examples.\n\nFor further context, watch the PyCon US 2018 talk about aiomultiprocess,\n[\"Thinking Outside the GIL\"][pycon-2018]:\n\n\u003e [![IMAGE ALT TEXT](http://img.youtube.com/vi/0kXaLh8Fz3k/0.jpg)](http://www.youtube.com/watch?v=0kXaLh8Fz3k \"PyCon 2018 - Amethyst Reese - Thinking Outside the GIL with AsyncIO and Multiprocessing\")\n\nSlides available at [Speaker Deck](https://speakerdeck.com/jreese/thinking-outside-the-gil-2).\n\n\nLicense\n-------\n\naiomultiprocess is copyright [Amethyst Reese](https://noswap.com), and licensed under\nthe MIT license.  I am providing code in this repository to you under an open\nsource license.  This is my personal repository; the license you receive to\nmy code is from me and not from my employer. See the `LICENSE` file for details.\n\n\n[User Guide]: https://aiomultiprocess.omnilib.dev/en/latest/guide.html\n[pycon-2018]: https://www.youtube.com/watch?v=0kXaLh8Fz3k\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomnilib%2Faiomultiprocess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomnilib%2Faiomultiprocess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomnilib%2Faiomultiprocess/lists"}