{"id":13459661,"url":"https://github.com/encode/httpx","last_synced_at":"2025-12-12T01:02:31.455Z","repository":{"id":37386234,"uuid":"179492861","full_name":"encode/httpx","owner":"encode","description":"A next generation HTTP client for Python. 🦋","archived":false,"fork":false,"pushed_at":"2025-04-01T16:15:32.000Z","size":7772,"stargazers_count":14009,"open_issues_count":85,"forks_count":891,"subscribers_count":114,"default_branch":"master","last_synced_at":"2025-04-30T11:55:09.276Z","etag":null,"topics":["asyncio","http","python","trio"],"latest_commit_sha":null,"homepage":"https://www.python-httpx.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/encode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"docs/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,"zenodo":null},"funding":{"github":"encode"}},"created_at":"2019-04-04T12:27:00.000Z","updated_at":"2025-04-30T11:31:58.000Z","dependencies_parsed_at":"2024-02-20T17:28:55.080Z","dependency_job_id":"4c47b434-953f-4884-ae27-5d2b6fc70d2c","html_url":"https://github.com/encode/httpx","commit_stats":{"total_commits":1444,"total_committers":241,"mean_commits":5.991701244813278,"dds":0.5429362880886426,"last_synced_commit":"41597adffa9d34171a63f7511fc0f702558dd08c"},"previous_names":["encode/http3"],"tags_count":88,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encode%2Fhttpx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encode%2Fhttpx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encode%2Fhttpx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encode%2Fhttpx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/encode","download_url":"https://codeload.github.com/encode/httpx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251962015,"owners_count":21671968,"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":["asyncio","http","python","trio"],"created_at":"2024-07-31T10:00:24.177Z","updated_at":"2025-12-12T01:02:31.449Z","avatar_url":"https://github.com/encode.png","language":"Python","funding_links":["https://github.com/sponsors/encode"],"categories":["Python","资源列表","HTTP Clients","📡 HTTP Clients","HTTP客户端","语言资源库","HarmonyOS","网络服务","python","HTTP","HTTP Clients [🔝](#readme)","📚 فهرست","Helpers","📦 Additional Python Libraries","Tool","Networking","http"],"sub_categories":["HTTP","Monitoring","Ruby","JavaScript","Windows Manager","网络服务_其他","Python libraries","شبکه","HTTP Clients","Web \u0026 APIs","HTTP Tool"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.python-httpx.org/\"\u003e\u003cimg width=\"350\" height=\"208\" src=\"https://raw.githubusercontent.com/encode/httpx/master/docs/img/butterfly.png\" alt='HTTPX'\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cstrong\u003eHTTPX\u003c/strong\u003e \u003cem\u003e- A next-generation HTTP client for Python.\u003c/em\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/encode/httpx/actions\"\u003e\n    \u003cimg src=\"https://github.com/encode/httpx/workflows/Test%20Suite/badge.svg\" alt=\"Test Suite\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/httpx/\"\u003e\n    \u003cimg src=\"https://badge.fury.io/py/httpx.svg\" alt=\"Package version\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\nHTTPX is a fully featured HTTP client library for Python 3. It includes **an integrated command line client**, has support for both **HTTP/1.1 and HTTP/2**, and provides both **sync and async APIs**.\n\n---\n\nInstall HTTPX using pip:\n\n```shell\n$ pip install httpx\n```\n\nNow, let's get started:\n\n```pycon\n\u003e\u003e\u003e import httpx\n\u003e\u003e\u003e r = httpx.get('https://www.example.org/')\n\u003e\u003e\u003e r\n\u003cResponse [200 OK]\u003e\n\u003e\u003e\u003e r.status_code\n200\n\u003e\u003e\u003e r.headers['content-type']\n'text/html; charset=UTF-8'\n\u003e\u003e\u003e r.text\n'\u003c!doctype html\u003e\\n\u003chtml\u003e\\n\u003chead\u003e\\n\u003ctitle\u003eExample Domain\u003c/title\u003e...'\n```\n\nOr, using the command-line client.\n\n```shell\n$ pip install 'httpx[cli]'  # The command line client is an optional dependency.\n```\n\nWhich now allows us to use HTTPX directly from the command-line...\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"700\" src=\"docs/img/httpx-help.png\" alt='httpx --help'\u003e\n\u003c/p\u003e\n\nSending a request...\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"700\" src=\"docs/img/httpx-request.png\" alt='httpx http://httpbin.org/json'\u003e\n\u003c/p\u003e\n\n## Features\n\nHTTPX builds on the well-established usability of `requests`, and gives you:\n\n* A broadly [requests-compatible API](https://www.python-httpx.org/compatibility/).\n* An integrated command-line client.\n* HTTP/1.1 [and HTTP/2 support](https://www.python-httpx.org/http2/).\n* Standard synchronous interface, but with [async support if you need it](https://www.python-httpx.org/async/).\n* Ability to make requests directly to [WSGI applications](https://www.python-httpx.org/advanced/transports/#wsgi-transport) or [ASGI applications](https://www.python-httpx.org/advanced/transports/#asgi-transport).\n* Strict timeouts everywhere.\n* Fully type annotated.\n* 100% test coverage.\n\nPlus all the standard features of `requests`...\n\n* International Domains and URLs\n* Keep-Alive \u0026 Connection Pooling\n* Sessions with Cookie Persistence\n* Browser-style SSL Verification\n* Basic/Digest Authentication\n* Elegant Key/Value Cookies\n* Automatic Decompression\n* Automatic Content Decoding\n* Unicode Response Bodies\n* Multipart File Uploads\n* HTTP(S) Proxy Support\n* Connection Timeouts\n* Streaming Downloads\n* .netrc Support\n* Chunked Requests\n\n## Installation\n\nInstall with pip:\n\n```shell\n$ pip install httpx\n```\n\nOr, to include the optional HTTP/2 support, use:\n\n```shell\n$ pip install httpx[http2]\n```\n\nHTTPX requires Python 3.9+.\n\n## Documentation\n\nProject documentation is available at [https://www.python-httpx.org/](https://www.python-httpx.org/).\n\nFor a run-through of all the basics, head over to the [QuickStart](https://www.python-httpx.org/quickstart/).\n\nFor more advanced topics, see the [Advanced Usage](https://www.python-httpx.org/advanced/) section, the [async support](https://www.python-httpx.org/async/) section, or the [HTTP/2](https://www.python-httpx.org/http2/) section.\n\nThe [Developer Interface](https://www.python-httpx.org/api/) provides a comprehensive API reference.\n\nTo find out about tools that integrate with HTTPX, see [Third Party Packages](https://www.python-httpx.org/third_party_packages/).\n\n## Contribute\n\nIf you want to contribute with HTTPX check out the [Contributing Guide](https://www.python-httpx.org/contributing/) to learn how to start.\n\n## Dependencies\n\nThe HTTPX project relies on these excellent libraries:\n\n* `httpcore` - The underlying transport implementation for `httpx`.\n  * `h11` - HTTP/1.1 support.\n* `certifi` - SSL certificates.\n* `idna` - Internationalized domain name support.\n* `sniffio` - Async library autodetection.\n\nAs well as these optional installs:\n\n* `h2` - HTTP/2 support. *(Optional, with `httpx[http2]`)*\n* `socksio` - SOCKS proxy support. *(Optional, with `httpx[socks]`)*\n* `rich` - Rich terminal support. *(Optional, with `httpx[cli]`)*\n* `click` - Command line client support. *(Optional, with `httpx[cli]`)*\n* `brotli` or `brotlicffi` - Decoding for \"brotli\" compressed responses. *(Optional, with `httpx[brotli]`)*\n* `zstandard` - Decoding for \"zstd\" compressed responses. *(Optional, with `httpx[zstd]`)*\n\nA huge amount of credit is due to `requests` for the API layout that\nmuch of this work follows, as well as to `urllib3` for plenty of design\ninspiration around the lower-level networking details.\n\n---\n\n\u003cp align=\"center\"\u003e\u003ci\u003eHTTPX is \u003ca href=\"https://github.com/encode/httpx/blob/master/LICENSE.md\"\u003eBSD licensed\u003c/a\u003e code.\u003cbr/\u003eDesigned \u0026 crafted with care.\u003c/i\u003e\u003cbr/\u003e\u0026mdash; 🦋 \u0026mdash;\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencode%2Fhttpx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fencode%2Fhttpx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencode%2Fhttpx/lists"}