{"id":13856764,"url":"https://github.com/joshlk/many_requests","last_synced_at":"2025-04-04T11:09:54.729Z","repository":{"id":55485386,"uuid":"311956579","full_name":"joshlk/many_requests","owner":"joshlk","description":"Dead easy interface for executing many HTTP requests asynchronously. Also provides helper functions for executing embarrassingly parallel async coroutines.","archived":false,"fork":false,"pushed_at":"2021-03-23T10:54:45.000Z","size":6053,"stargazers_count":386,"open_issues_count":1,"forks_count":7,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-28T10:03:21.644Z","etag":null,"topics":["async","python","requests"],"latest_commit_sha":null,"homepage":"","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/joshlk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.html","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-11T11:55:24.000Z","updated_at":"2025-02-10T16:23:41.000Z","dependencies_parsed_at":"2022-08-15T01:20:58.870Z","dependency_job_id":null,"html_url":"https://github.com/joshlk/many_requests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshlk%2Fmany_requests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshlk%2Fmany_requests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshlk%2Fmany_requests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshlk%2Fmany_requests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshlk","download_url":"https://codeload.github.com/joshlk/many_requests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166137,"owners_count":20894652,"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","python","requests"],"created_at":"2024-08-05T03:01:12.405Z","updated_at":"2025-04-04T11:09:54.694Z","avatar_url":"https://github.com/joshlk.png","language":"Python","funding_links":[],"categories":["Python","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"[![PyPI](https://img.shields.io/pypi/v/dataclassframe)](https://pypi.org/project/many_requests/)\n![Python](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue)\n[![Build Status](https://travis-ci.com/joshlk/many_requests.svg?branch=main)](https://travis-ci.com/joshlk/many_requests)\n[![Documentation](https://readthedocs.org/projects/pip/badge/?version=latest\u0026style=flat)](https://joshlk.github.io/many_requests)\n\n# many_requests\n\nDead easy interface for executing many HTTP requests asynchronously.\nIt has been tested in the wild with over 10 million requests.\nAutomatically handles errors and executes retries.\n\nBuilt on-top of [Trio](https://github.com/python-trio/trio) and [asks](https://github.com/theelous3/asks). Interface heavily inspired by [Requests](https://github.com/psf/requests) and [joblib](https://github.com/joblib/joblib).\n\nAlso provides helper functions for executing [embarrassingly parallel](https://en.wikipedia.org/wiki/Embarrassingly_parallel) async coroutines.\n\nTo install:\n\n```bash\npip install many-requests\n```\n\n## Example Usage\n\nExecute 10 GET requests for example.org:\n\n```python\nfrom many_requests import ManyRequests\nresponses = ManyRequests(n_workers=5, n_connections=5)(\n                method='GET',\n                url=['https://example.org' for i in range(10)])\n```\n\nQuery HackNews API for 10 items and parse JSON output:\n\n```python\nresponses = ManyRequests(n_workers=5, n_connections=5, json=True)(\n                method='GET',\n                url=[f'https://hacker-news.firebaseio.com/v0/item/{i}.json?print=pretty' for i in range(10)])\n```\n\nTo use basic authentication with all requests:\n\n```python\nfrom asks import BasicAuth\nusername = 'user'\npassword = 'pw'\nresponses = ManyRequests(n_workers=5, n_connections=5)(\n                method='GET',\n                url=['https://example.org' for i in range(10)],\n                auth=BasicAuth((username, password)))\n```\n\nTo execute embarrassingly parallel async coroutines, for example 10 `trio.sleep` calls:\n\n```python\nfrom many_requests import EasyAsync, delayed\nimport trio\noutputs = EasyAsync(n_workers = 4)(delayed(trio.sleep)(i) for i in range(10))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshlk%2Fmany_requests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshlk%2Fmany_requests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshlk%2Fmany_requests/lists"}