{"id":13501775,"url":"https://github.com/theelous3/asks","last_synced_at":"2025-05-15T08:08:18.358Z","repository":{"id":17018273,"uuid":"80945517","full_name":"theelous3/asks","owner":"theelous3","description":"Async requests-like httplib for python.","archived":false,"fork":false,"pushed_at":"2022-05-17T11:06:32.000Z","size":885,"stargazers_count":509,"open_issues_count":38,"forks_count":63,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-15T01:59:01.310Z","etag":null,"topics":["async","async-requests","concurrency","curio","http","io","network","python3","requests","trio"],"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/theelous3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-04T20:14:32.000Z","updated_at":"2025-04-11T00:28:02.000Z","dependencies_parsed_at":"2022-08-07T08:15:43.505Z","dependency_job_id":null,"html_url":"https://github.com/theelous3/asks","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theelous3%2Fasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theelous3%2Fasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theelous3%2Fasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theelous3%2Fasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theelous3","download_url":"https://codeload.github.com/theelous3/asks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991544,"owners_count":21194894,"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","async-requests","concurrency","curio","http","io","network","python3","requests","trio"],"created_at":"2024-07-31T22:01:49.954Z","updated_at":"2025-04-15T01:59:06.767Z","avatar_url":"https://github.com/theelous3.png","language":"Python","readme":"[![Build Status](https://travis-ci.org/theelous3/asks.svg?branch=master)](https://travis-ci.org/theelous3/asks) [![Docs Status](https://readthedocs.org/projects/asks/badge/?version=latest)](http://asks.readthedocs.io/en/latest/)\n\n\n# asks\n`asks` is an async `requests`-like HTTP lib, for use in conjunction with the wonderful [curio](https://github.com/dabeaz/curio) and [trio](https://github.com/python-trio/trio) async libs.\n\n`asks` aims to have a mostly familiar API, using simple functions/methods like `get()` for getting and `post()` for posting.\nAt the heart of `asks` is a session class which makes interacting with the web in a sustained and fluid way fast, efficient, and simple. Check out the examples!\n\n\n## Check the docs!\n\nhttp://asks.readthedocs.io/\n\nAbove you'll find detailed docs with a large number of simple examples to help you get off the ground in no time.\n\n## Installation\n\n*Requires: Python 3.6.2 or newer.*\n\n`pip install asks`\n\n\n## Examples\n\n```python\n# one request\n# A little silly to async one request, but not without its use!\nimport asks\nimport anyio\n\nasync def example():\n    r = await asks.get('https://example.org')\n    print(r.content)\n\nanyio.run(example)\n```\n\n```python\n# many requests\n# make 1k api calls and store their response objects\n# in a list.\n\nimport asks\nimport trio\n\npath_list = ['http://fakeurl.org/get','http://example123.org']\n\nresults = []\n\n\nasync def grabber(s, path):\n    r = await s.get(path)\n    results.append(r)\n\n\nasync def main(path_list):\n    from asks.sessions import Session\n    s = Session('https://example.org', connections=2)\n    async with trio.open_nursery() as n:\n        for path in path_list:\n            n.start_soon(grabber, s, path)\n\ntrio.run(main, path_list)\n\n```\n\n#### Changelog\n\n*2.0.0* - Setting `stream=True` means that the response returned will be a `StreamResponse` object rather than the default `Response` object.\n\n##### Shoutout to ##lp, and the fine peeps of 8banana\n","funding_links":[],"categories":["Python","网络"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheelous3%2Fasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheelous3%2Fasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheelous3%2Fasks/lists"}